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

3 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Torsten
Torsten il 20 Lug 2017
Put them in the fittype equation as parameters-squared.
Best wishes
Torsten.
  3 Commenti
Torsten
Torsten il 20 Lug 2017
Modificato: Torsten il 20 Lug 2017
Yes, put the parameters squared in the fittype function and square the results after solving.
Best wishes
Torsten.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Linear and Nonlinear Regression in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by