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.

답변 (1개)

Alan Weiss
Alan Weiss 2016년 6월 23일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Simulated Annealing에 대해 자세히 알아보기

질문:

2016년 6월 23일

답변:

2016년 6월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by