Fit a curve of equation of form y = ax^b to data

조회 수: 14 (최근 30일)
Ershad Ahamed Chemmalasseri
Ershad Ahamed Chemmalasseri 2012년 6월 19일
답변: hitesh Mehta 2018년 2월 17일
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.
  댓글 수: 1
Sussana Okeleye
Sussana Okeleye 2015년 12월 2일
Hi , did you ever figure out how to do this?

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

채택된 답변

Honglei Chen
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

추가 답변 (2개)

Sean de Wolski
Sean de Wolski 2012년 6월 19일
Any of these are designed for this.
  • lsqcurvefit Optimization Toolbox
  • nlinfit Statistics Toolbox
  • NonlinearModel Statistics Toolbox >= R2012a.

hitesh Mehta
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.

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by