non linear least square fit

Hello
I would like to fit a data set (X,Y) with a non linear function y=f(x,a,b) where a and b are the paramters to be fitted.
the function to be fitted is: a(x^(-1/b)-2^(-1/b))
In my case Y values have uncertainty associated with them.
how to do weighted non-linear least-square fitting?
guys help me out. M badly stuck. :(
Thank you,

7 件のコメント

Michael Haderlein
Michael Haderlein 2014 年 9 月 4 日
Do you have access to the curve fitting toolbox? If so, just enter "cftool" and the respective tool will be opened. It's quite self-explaining. If you need to do this repeated times, check out the function "fit". There's a good example which can you can copy-paste and adopt to your needs.
aditi
aditi 2014 年 9 月 4 日
hey... i tried with cftools also... but its not giving good results to i need to do without cftool
Michael Haderlein
Michael Haderlein 2014 年 9 月 4 日
cftool is just a gui which allows you to apply all the fitting algorithms in a simple manner. Bad results usually originate from bad starting points. Sometimes, fitting can be hard work and takes a lot of time depending on the data and the model.
aditi
aditi 2014 年 9 月 4 日
okk... actually using cftool m getting b value=6 which should come ~ 2... so how to improve results??
Michael Haderlein
Michael Haderlein 2014 年 9 月 4 日
If you know that b should be around 2, you can also fix it to 2 and only fit a. Afterwards, you take the result of a as inital value for a, 2 as initial value for b and fit again.
John D'Errico
John D'Errico 2014 年 9 月 4 日
You have provided insufficient information to know why b is coming out with an unexpected value. No data, so no idea.
aditi
aditi 2014 年 9 月 4 日
hey... this is the data...

回答 (0 件)

この質問は閉じられています。

質問済み:

2014 年 9 月 4 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by