How do I apply exponential and logarithmic curve fitting
Mostrar comentarios más antiguos
Hi,
I have some scatterplots and I want to check the relationships between the variables which resemble exponential and logarithmic functions. I have tried to use the functions
nlinfit
fittype
fit
but so far not successfully (poor fitting or code not working at all).
How can I check the curves for the above scatters which seem to have the following functions:
y= a*exp(b*x)+c and y=log_a(x)+b
in matlab?
Thanks
Iro
3 comentarios
Star Strider
el 19 de Feb. de 2014
What do you mean by ‘code not working at all’?
It’s not obvious to me what you mean here: y=log_a(x)+b. (I don’t understand ‘log_a(x)’.)
yeungor
el 25 de Sept. de 2016
Have you tried fitting an exponential of the inverse? If x = f(y), then y = f^-1(x) and you can use 'fit' and the 'exp' for an exponential fit.
Respuesta aceptada
Más respuestas (1)
Danilo NASCIMENTO
el 19 de Feb. de 2014
0 votos
You can use cf = fit(x,y,'exp1'); where x and y are your set of points.
1 comentario
Iro
el 20 de Feb. de 2014
Categorías
Más información sobre Linear and Nonlinear Regression 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!