Curve fitting a power law function a(x^b) + C

7 Ansichten (letzte 30 Tage)
Tom
Tom am 10 Mär. 2017
Kommentiert: Torsten am 13 Mär. 2017
Greetings. I have been trying to fit a power law function through a data set through: p = polyfit(log(x),log(y),1) This gives me the values for coefficient a and b, but I cannot figure out how to get c. Any help or advice would be greatly appreciated. Thanks.

Akzeptierte Antwort

Torsten
Torsten am 10 Mär. 2017
Use lsqcurvefit.
Best wishes
Torsten.
  2 Kommentare
Tom
Tom am 10 Mär. 2017
Thanks for the prompt response. How exactly would I initialize the equation that I would like to fit? Thanks.
Torsten
Torsten am 13 Mär. 2017
fun=@(x,xdata)x(1)*xdata.^x(2)+x(3);
Best wishes
Torsten.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by