Is there any way to limit the resolution time to lsqnonlin?

1 回表示 (過去 30 日間)
Jurgen
Jurgen 2014 年 12 月 6 日
コメント済み: Matt J 2014 年 12 月 6 日
I have a "while" cycle that execute a optimization using lsqnonlin, the problem is that in some iterations it can't solve the system, showing the following:
"Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 3.1e+01. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy."
It sometimes happen by hours, so I want to know if is there any way to limit the resolution time to lsqnonlin or a way to follow with the next iteration? (I do not care if I do not get a solution for this iteration)

回答 (1 件)

Matt J
Matt J 2014 年 12 月 6 日
編集済み: Matt J 2014 年 12 月 6 日
You can use the 'OutputFcn' option to send a stop signal. lsqnonlin will stop when the Output Function returns a value of 1.
  2 件のコメント
Jurgen
Jurgen 2014 年 12 月 6 日
Thanks Matt, but could you please explain to me how would be this function?
Matt J
Matt J 2014 年 12 月 6 日
Did you read the link? It has examples there.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by