How do I constrain a vector's value within a nonlinear fit?

3 次查看(过去 30 天)
I am fitting a set of data using nlinfit as magnetic dipoles and I want my fitted parameters to be only positive.
How do I make this constraint?

采纳的回答

Torsten
Torsten 2017-7-20
Put them in the fittype equation as parameters-squared.
Best wishes
Torsten.
  3 个评论
Torsten
Torsten 2017-7-20
编辑:Torsten 2017-7-20
Yes, put the parameters squared in the fittype function and square the results after solving.
Best wishes
Torsten.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by