Problem with Power Regression
Mostrar comentarios más antiguos
I have a coding to develop a formula using power regreesion
Here my coding:
plot(Xbin,Ybin,'+r'), hold on
p = polyfit(log(Xbin),log(Ybin),2);
m = p(1);
b = exp(p(2));
ezplot(@(x) b*Xbin.^m,[Xbin(1) Xbin(end)])
Error in Power_Regression (line 242)
ezplot(@(x) b*Xbin.^m,[Xbin(1) Xbin(end)])
I appreciate the help
Akhmad
2 comentarios
Image Analyst
el 19 de Jul. de 2019
Why not use fitnlm() for a better fit? I'm attaching several examples. Would you consider that (fitnlm) instead of taking the log and doing polyfit() on the logged data?
Skydriver
el 20 de Jul. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with Curve Fitting Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!