Fit a curve of equation of form y = ax^b to data
조회 수: 14 (최근 30일)
이전 댓글 표시
Hi,
How do I fit a curve of equation of form y = ax^b to my data. I have x and y values. I have to find a and b (it can be a fraction) and plot the curve.
채택된 답변
Honglei Chen
2012년 6월 19일
If you have Curve Fitting Toolbox, you can use that to do an exponential fitting directly
If not, you can take logarithm of both sides and translate that into a linear fitting problem, i.e.
log(y) = log(a)+b*log(x)
and then use polyfit
댓글 수: 0
추가 답변 (2개)
Sean de Wolski
2012년 6월 19일
Any of these are designed for this.
- lsqcurvefit Optimization Toolbox
- nlinfit Statistics Toolbox
- NonlinearModel Statistics Toolbox >= R2012a.
댓글 수: 0
hitesh Mehta
2018년 2월 17일
Hi,
How do I fit a curve of equation of form y = ax^b+c to my data. I have x and y and c values.
I have to find a and b(it can be a fraction) and plot the curve.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Fit Postprocessing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!