Can I use one of the error models in Simbiology (constant/proportional/combined) while estimating parameters in MATLAB? I am using lsqnonlin for curvefitting and estimating the parameters. How can I incorporate a constant error function with it?

 採用された回答

Arthur Goldsipe
Arthur Goldsipe 2019 年 10 月 9 日

0 投票

SimBiology's error models are only available when fitting data to SimBiology models using functions like sbiofit. If you are directly calling lsqnonlin, then you are probably doing "traditional" nonlinear least-squares regression, which is equivalent to a constant error model. It is possible to adapt lsqnonlin for other error models, but it requires a fair amount of work. If you can't use sbiofit, then I would recommend using fitnlm (or perhaps nlinfit), if you have a license for Statistics and Machine Learning Toolbox. Both of these functions support proportional and combined error models.

3 件のコメント

Minu Pilvankar
Minu Pilvankar 2019 年 10 月 9 日
Thank you Arthur! yes, I am trying to do it the traditional way. I thought of fitnlm or nlinfit. But they do not let me add constraints while estimating parameters. So, i was opting to go with lsqnonlin or lsqcurvefit
Arthur Goldsipe
Arthur Goldsipe 2019 年 10 月 9 日
Since I'm a developer on the SimBiology team, my other recommendation would be to use SimBiology. :-)
If that's not possible, you can take a look here to see how sbiofit reformulates other error models into a form that can be used with lsqnonlin.
Minu Pilvankar
Minu Pilvankar 2019 年 10 月 10 日
Thank you Arthur!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Extend Modeling Environment についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by