How to suppress warnings from fsolve method?
43 ビュー (過去 30 日間)
古いコメントを表示
Hello,
how to suppress these kind of warnings for the fsolve method? It is orange by the way.
Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using Levenberg-Marquardt algorithm instead.
> In fsolve (line 298)
In function1 (line 24)
In mainScript (line 265)
Thank you!
0 件のコメント
回答 (2 件)
Jan
2017 年 5 月 9 日
編集済み: Jan
2017 年 5 月 9 日
The message means, that the default choise of the Trust-region-dogleg method is not suffcient.
The best way to suppress a warning is to fix the reason. If you know in advance, that you need a Levenberg-Marquardt algorithm, enable it explicitely instead of letting fsolve examine the problem by its own. See https://www.mathworks.com/help/optim/ug/fsolve.html#inputarg_options .
5 件のコメント
Walter Roberson
2017 年 5 月 9 日
What benefit is being derived from not passing in the Algorithm option?
Jan
2017 年 5 月 10 日
@Manuela: It is possible to suppress warning messages, see doc warning . But it is a bad idea to ignore warnings. Even if you now know, what you are doing, your program might change in the future. Your data might be delivered as square matrix by accident and then a completely different solver is used. This might have unexpected consequences.
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!