fitting parabolic looking data to an exponential function
Ältere Kommentare anzeigen
Hello,
I have data which looks like many different parabolas. I would like to fit each parabolic data set to an exponential function and determine if it is cubic quadratic or so.
I tried this
g = fittype('a*exp(b*x)');
f0 = fit(x,y,g,'StartPoint',[0,0,0]);
plot(x,y,'o')
hold on;
plot(f0(xx),'r-');
but it gives me a line. Perhaps something is wrong with my code. Any ideas? :)
Antworten (1)
Matt J
am 7 Okt. 2022
Nothing is wrong with your code, but I recommend using the built-in 'exp1' model instead, which doesn't require a start point.
f0 = fit(x,y,'exp1');
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!