How to follow the progress of fminunc

4 次查看(过去 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 CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by