MATLAB: The “Current Function Value” plot

current function valueoptimization toolOptimization Toolbox

Hello, How can i get "current function value" giving by Optimization tool using only the command line?
Thanks !

Best Answer

Construct an options structure that includes PlotFcn and give an option value of @optimplotfval . The options structure can be constructed using the new optimoptions or the older optimset .
The options structure must be passed as the 10th parameter to fmincon(), so if you do not need some of the parameters, pass [] in their place.