help on fitting a curve
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how do you fit data with a peak using a Gaussian curve? If there are two peaks but you only want to fit a curve within a specific range asked by the user, how do you fit a curve?
0 Kommentare
Antworten (1)
Wayne King
am 10 Jul. 2012
Bearbeitet: Wayne King
am 10 Jul. 2012
Do you have the curve fitting toolbox?
If so, cftool has a Gaussian option built in.
Or from the command line:
x = (-3:0.01:3)';
y = exp(-x.^2/2);
yfit = fit(x,y,'gauss1');
2 Kommentare
Wayne King
am 11 Jul. 2012
Do you mean datatype double-precision? why not, the example I have above uses double-precision vectors.
Siehe auch
Kategorien
Mehr zu Multivariate Models 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!