To find the exponent for a data

I have a non-linear data of the form: y=x^a. The data looks more like an exponential curve and I wanted to find the best value for 'a'.
Can you please suggest how to fit the data and obtain 'a' using MATLAB ?

 采纳的回答

Laurent
Laurent 2013-10-23
编辑:Laurent 2013-10-23

1 个投票

If you want to do this only once, you could use the Curve Fitting Tool using the command 'cftool'. You only need a variable with your x-values and a variable with y-values. Select them in the Tool and select the appropriate function.
If you want to do this in a script or function, or on the command line, you can use 'lsqnonlin'

1 个评论

Gokul Raju
Gokul Raju 2013-10-23
编辑:Gokul Raju 2013-10-23
Thanks Laurent. Very useful, could try various options that are there to fit the data.

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Least Squares 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by