フィルターのクリア

How to check optimized values after stopping the program midway?

5 ビュー (過去 30 日間)
Ajay Goyal
Ajay Goyal 2017 年 3 月 29 日
回答済み: Alan Weiss 2017 年 3 月 29 日
I am using lsqnonlin (Levenberg-Marquardt algorithm) code to optimize 4 variables as can be seen in attached file. Many times I wish to stop my program mid way to check optimized values resulted from last iteration.Once I press ctrl+c in coomand window, program stops but does not give optimized value. I know that stopping and checking results mid way is possible using optimization toolbox. but I wish to use code and then check the solution mid way. Can anyone help.

採用された回答

Alan Weiss
Alan Weiss 2017 年 3 月 29 日
You can use a plot function to monitor your optimization. You can write a custom plot function that writes data to a variable at every iteration so you don't lose anything if you stop it midway. An output function can do this, too, and that link shows an example of keeping a history.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by