Error working with saoptmset OutputFcns

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.

Respuestas (1)

Alan Weiss
Alan Weiss el 23 de Jun. de 2016

0 votos

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

Categorías

Preguntada:

el 23 de Jun. de 2016

Respondida:

el 23 de Jun. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by