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에 대해 자세히 알아보기

질문:

2013년 10월 23일

댓글:

2013년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by