How to constrain the results calculated by "nlinfit" from complex number to real number?

2 vues (au cours des 30 derniers jours)
kang wang
kang wang le 4 Août 2017
Modifié(e) : John D'Errico le 4 Août 2017
Hello everybody,
Recently I used the mathematic function "nlinfit" to execute the fit. Unfortunately, the results show that the fitting coefficients are complex number, which does not have a physical meaning of my model.
I know there is one way to just use the absolute value to get real number after the fitting. However, it is just a trick! So how can I constrain it to real number before starting the fitiing?
  2 commentaires
Torsten
Torsten le 4 Août 2017
You will have to constrain the parameters E and B such that T_b-T^0 remains positive.
Best wishes
Torsten.
John D'Errico
John D'Errico le 4 Août 2017
Modifié(e) : John D'Errico le 4 Août 2017
Taking the absolute value does not provide a useful solution anyway, since the result is not a minimum sum of squares of errors.
As Torsten said, you need to prevent that term from going negative or zero. This is not possible to do using nlinfit of course, since nlinfit does not allow that class of constraint on the parameters.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by