iter-detailed’ option with fminsearch
이전 댓글 표시
Hello, I am trying to find the minimum of a certain function f by using the command fminsearch in MATLAB and I would like to know if there is any way to have the algorithm tell me in each iteration which is the value of the variable used to evaluate the function f, as well as the value of f itself. I know that the latter can be achieved by using the ’iter-detailed’ option, but it still doesn’t give me the value of the variable used in each iteration. I leave my command setting below just in case. options = optimset(’disp’,’iter-detailed’,’MaxFunEvals’,1000,’TolX’,1e-9); MIN = fminsearch(@f,[0.1,0.2,0.09],[ ],[ ],options); ; Thanks in advance
답변 (1개)
Stephen23
2015년 2월 16일
0 개 추천
The current version of MATLAB (2014b) does not list iter-detailed as an option for fminsearch , only iter. And the documentation states that that option iter displays the following for fminsearch: Iteration, Func-count, min f(x) and Procedure. Sorry, no x or f(x).
But you could display this information yourself if you write your own OutputFunction. When you supply its handle in the options structure it is called on every iteration with the current values. You can then print, display or store these values in whatever way you wish.
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!