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

11 次查看(过去 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
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 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by