Error working with saoptmset OutputFcns
Show older comments
I am trying to construct history for my objective function in the a simulated annealing algorithm. I am working according to the example suggested in the "Wriing output function" link: http://se.mathworks.com/help/optim/ug/output-functions.html, I have my option for saoptimset as
options = saoptimset('MaxFunEvals', 10000, 'InitialTemperature', 10000, 'OutputFcns', @outfun);
and the way i call the algorithm is
xsol=simulannealbnd(@COST_function,x0,lb,ub, options);
and I follow the same as in example for the outfunc except my objective function which I have defined in the @cost_function. I get a long list of errors starting with too many input arguments and so on. I am unable to find a example to read through for this. Any suggestions and help are appreciated. Thanks.
Answers (1)
Alan Weiss
on 23 Jun 2016
0 votes
The syntax for a simulannealbnd output function differs from that of an Optimization Toolbox™ output function. See the simulated annealing output function syntax here.
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Simulated Annealing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!