MATLAB Answers


How can I extract function evaluations that happen during iterations (fmincon) ?

Helena Weddell さんによって質問されました 2019 年 3 月 9 日
最新アクティビティ Helena Weddell さんによって コメントされました 2019 年 3 月 11 日
I am using fmincon and I would like to see/store the values of the objective function and my 3 variables during iterations, not just the values at the end of each iteration - is this possible ? I can see that there are multiple function evaluations per iteration and would like to store and then plot these values :
function evals.png

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: Alan Weiss
2019 年 3 月 11 日

The only way I know to do this is to have your objective function either display or write the values as it calculates them. The usual way to extract information from an optimization solver is to use an output function, but output functions only report the result at the end of each iteration, not all internal calculations.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

  1 件のコメント

Helena Weddell 2019 年 3 月 11 日
Thanks Alan, I will have a go at using the objective function to store these values.

サインイン to comment.

Translated by