MATLAB Answers

using least square fit to find the best fit parameters

1 ビュー (過去 30 日間)
Annie Ng
Annie Ng 2020 年 2 月 26 日
回答済み: Alex Sha 2020 年 2 月 26 日
I have 3 variables y, x1, and x2 stored in vector form. I know that y=f(x1,x2) and has the form y = a*b*x1/(1+b*x1+c*x2) + d*x1. a,b,c, and d are parameters. How can I use lsqnonlin to find a,b,c,d?
Thank you

  5 件のコメント

表示 2 件の古いコメント
Rik
Rik 2020 年 2 月 26 日
A low quality fit can have two reasons, either the algorithm failed or the data is too noisy. I don't know how sensitive lsqnonlin is to initial values, but it is possible you ended up with a local minimum.
Annie Ng
Annie Ng 2020 年 2 月 26 日
is there any other way that I can find the parameters?
Rik
Rik 2020 年 2 月 26 日
You could try with a different fitting function or with different initial guesses. Those two will only help if your function properly describes the trend in your data and if your data isn't noisy in the first place.

サインインしてコメントする。

回答 (1 件)

Alex Sha
Alex Sha 2020 年 2 月 26 日
Hi, Annie, upload your data file please, if possible.

  0 件のコメント

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by