How to avoid negative intermediate guess in nlmefit

2 次查看(过去 30 天)
Hello everyone,
when I use nlmefit, it always comes up with some negative guess after a few iterations, these negative values crash my ODE solver. Is there a way to avoid this?
The easiest way I can think of is to set lower bound for fitted parameters, however, I cannot figure out how to do that with nlmefit.
Thank you!
Rui

采纳的回答

Tom Lane
Tom Lane 2014-10-18
If a parameter P needs to be positive, sometimes people will instead estimate a parameter logP and then use exp(logP) in place of P in their function.
  3 个评论
Tom Lane
Tom Lane 2014-10-19
I'd forgotten about this parameter. Yes, I'd use that to specify a log transform and let the function take care of converting the covb matrix.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver-Based Nonlinear Optimization 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by