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

조회 수: 2 (최근 30일)
Tom
Tom 2017년 3월 10일
댓글: Torsten 2017년 3월 13일
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.

채택된 답변

Torsten
Torsten 2017년 3월 10일
Use lsqcurvefit.
Best wishes
Torsten.
  댓글 수: 2
Tom
Tom 2017년 3월 10일
Thanks for the prompt response. How exactly would I initialize the equation that I would like to fit? Thanks.
Torsten
Torsten 2017년 3월 13일
fun=@(x,xdata)x(1)*xdata.^x(2)+x(3);
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by