How to follow the progress of fminunc

11 ビュー (過去 30 日間)
Gurra
Gurra 2021 年 6 月 30 日
コメント済み: Gurra 2021 年 6 月 30 日
I would like to follow the progress of fminunc is some suitable way. What I can see, there seems to be something called "PlotFcns" in the fminunc.m. Can it be used to plot the progress in some way, like for instance the cost vs nbr iterations, continuously updated during the optimization?
If so, how do I activate the PlotFcns, when calling the fminunc?
If not, is there any other good way to follow the progress? Can I access the final cost in some way aswell?
Thanks.

採用された回答

Alan Weiss
Alan Weiss 2021 年 6 月 30 日
See the Plot Functions topic.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 件のコメント
Gurra
Gurra 2021 年 6 月 30 日
Thanks! I found the solution following the link by @Alan Weiss
For the sake of other users: I simply added 'PlotFcn', @optimplotfval to the options structure (in my code using optimset).
options = optimset('MaxIter', 100,'PlotFcn',@optimplotfval);

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by