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

3 visualizaciones (últimos 30 días)
matlabkid602
matlabkid602 el 20 de Jul. de 2017
Comentada: matlabkid602 el 20 de Jul. de 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?

Respuesta aceptada

Torsten
Torsten el 20 de Jul. de 2017
Put them in the fittype equation as parameters-squared.
Best wishes
Torsten.
  3 comentarios
Torsten
Torsten el 20 de Jul. de 2017
Editada: Torsten el 20 de Jul. de 2017
Yes, put the parameters squared in the fittype function and square the results after solving.
Best wishes
Torsten.
matlabkid602
matlabkid602 el 20 de Jul. de 2017
Thank you, it works.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by