Curve fitter app with custom function
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
HYZ
am 2 Sep. 2022
Kommentiert: Walter Roberson
am 6 Sep. 2022
Hi, I have a gaussian function y=A*exp(-(x-mu).^2/(2*sigma^2)).
I want to use custom equation in curve fitter. The default setting in the custom equation is a*exp(-b*x)+c.
How should I key in mu and sigma in custom equation? I put "a*exp(-(x-b).^2/(2*c^2))" but the curve doesn't look correct.
I used Gaussian option with 'gauss2' and the curve looks fine but the equation for gauss2 is not exactly same as my custom function. that's why I want to use custom function. Please advise.
thanks.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Sep. 2022
If you are using cftool, then when you get to the place to enter the custom equation, you can just enter
A*exp(-(x-mu).^2/(2*sigma^2))
and it will estimate all of the parameters.
Note: you might want to consider adding a constant term to the equation.
6 Kommentare
Walter Roberson
am 6 Sep. 2022
I would suggest constraining b1 as well to positive... keep constraining more variables to positive until you stop getting coefficients that cross 0 in the confidence bounds.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!