Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
matlabkid602
matlabkid602 am 20 Jul. 2017
Kommentiert: matlabkid602 am 20 Jul. 2017
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?

Akzeptierte Antwort

Torsten
Torsten am 20 Jul. 2017
Put them in the fittype equation as parameters-squared.
Best wishes
Torsten.
  3 Kommentare
Torsten
Torsten am 20 Jul. 2017
Bearbeitet: Torsten am 20 Jul. 2017
Yes, put the parameters squared in the fittype function and square the results after solving.
Best wishes
Torsten.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by