Error with simulannealbnd input argument of type function_handle
Ältere Kommentare anzeigen
I am trying to run an optimization example problem with the function simulannealbnd, but I get this error message saying that I cannot use a function handle as input argument. Yes, I do have the Global Optimization toolbox, which I verified using the command 'ver'. I am able to plot the demo function dejong5fc and I am also able to call 'help simulannealbnd', which definitely confirms that the toolbox is installed. I don't understand why none of the demo files work. They all output the same error message.
I was following these guidelines: http://www.mathworks.com/help/gads/examples/simulated-annealing-options.html
Also, I am using MATLAB R2015b. Both folders with demo functions and the simulannealbnd function have been added to the search path.
ObjectiveFunction = @dejong5fcn;
startingPoint = [-30 0];
lb = [-64 -64];
ub = [64 64];
>> plotobjective(ObjectiveFunction,[-64 64; -64 64]);
view(-15,150);
>> [x,fval,exitFlag,output] = simulannealbnd(ObjectiveFunction,startingPoint,lb,ub);
Undefined function 'simulannealbnd' for input arguments of type 'function_handle'.
Antworten (1)
David
am 18 Sep. 2017
It is possible to have the toolbox and the files, but no license. Check
>> which -all simulannealbnd
The output may look like this:
/Applications/MATLAB_R2016b.app/toolbox/globaloptim/globaloptim/simulannealbnd.m % Has no license available
Kategorien
Mehr zu Simulated Annealing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!