Error with simulannealbnd input argument of type function_handle

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.
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'.

Answers (1)

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

Asked:

on 17 Feb 2016

Answered:

on 18 Sep 2017

Community Treasure Hunt

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

Start Hunting!