OutputFun for optimizers (fminunc, fmincon etc), saving intermediate results
in global variable "outputFcn_global_data" for later access.
It is not supposed for live updates during optimization but for
later inspection, which is much more efficient.
options = optimoptions( ... , 'OutputFcn',@outputFcn_global );
[XOpt,fval,exitflag,output] = fminunc(@fun, X0, options);
See also the supplied example file.
Daniel Frisch (2021). outputFcn_global (https://www.mathworks.com/matlabcentral/fileexchange/80831-outputfcn_global), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!