fitting parabolic looking data to an exponential function
Mostrar comentarios más antiguos
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? :)
Respuestas (1)
Matt J
el 7 de Oct. de 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');
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!