Parameters obtained using lsqcurvefit results in complex numbers.

4 visualizaciones (últimos 30 días)
Ghansyam Vadodaria
Ghansyam Vadodaria el 28 de Jun. de 2019
Comentada: Torsten el 3 de Jul. de 2019
Hi. I tried to fit simultaneous ODE using lsqcurvefit. Code works well and provide parameters. But parameters are coming as complex number. In my case parameters must be real number. How to restrict parameters to real numbers using lsqcurvefit?
  7 comentarios
Ghansyam Vadodaria
Ghansyam Vadodaria el 3 de Jul. de 2019
Torsten,
You were a great help. I solved my problem with the help of your valuable inputs. NonNegative option did not work for my problem, but other suggestion (abs(PP(1))^a) worked for me. Now I am getting parameters which are real. Thank you so much for your valuable response.
Torsten
Torsten el 3 de Jul. de 2019
But note that by this trick, the results of your ODEs might have changed compared to the original ODE without the abs().

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by