Mathematica Asked by Tharaka on October 8, 2020
I want to convolve two equation, then I want to find the parameters. But it doesn’t give the answer and Takes too much time. What is the wrong with my code?
nlm = NonlinearModelFit[
data, {Convolve[
a*UnitStep[x - b]*c*Sqrt[x - b]*
Divide[Pi*Divide[Sqrt[d], Sqrt[x - b]]*
Exp[Pi*Divide[Sqrt[d], Sqrt[x - b]]],
Sinh[Pi*Divide[Sqrt[d], Sqrt[x - b]]]] +
a*d*Sum[Divide[4*Pi, n^3]*DiracDelta[x - b + d/n^2], {n, 1, 1}],
VoigtDistribution, x, y], b < Min[data[[All, 1]]],
b < Min[data[[All, 1]]]}, {{a, 10}, {b, -1}, c, d}, x];
nlm["BestFitParameters"]
I neither know the context of your calculation nor do I know properties of the Voigt distribution so I cannt help you choose those:
According to the reference and the wikipedia-article it should be VoigtDistribution[sigma,delta]
where sigma
is the standard-error of the underlying gauss distributionand delta is the $gamma$ of the unerdlying Lorentz distribution.
As VoigtDistribution[sigma,delta]
gives you a distribution you have to use
PDF[VoigtDistribution[sigma,delta],x]
Secondly you should test around if your expression within the NonlinearModel fit evaluates and trace the error piece by piece.
Answered by meneken17 on October 8, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP