MATLAB: This is the code i am getting error with x = simulannea​lbnd(Objec​tiveFuncti​on,X0,ydat​a,lb,ub). can help me to resolve it

MATLABsimulated annealing

function y = parameterized_objective(x,xdata)
y =x(1)./((x(2).*(xdata.^(1+0.9)))+x(3).*(xdata.^(0.9))+1);
ydata=(0.2575./((xdata.^2)+(0.333.*xdata)+1));
xdata =[ 10.^(-5) 10.^(-4) 10.^(-3) 10.^(-2) 10.^(-1) 1] ;
ObjectiveFunction = @(x)parameterized_objective(x,xdata);
X0 = [0; 0; 0 ];
lb = [0.2; 0.2; 0.2];
ub = [1; 1; 1];
x = simulannealbnd(ObjectiveFunction,X0,ydata,lb,ub)

Best Answer

The simulannealbnd function does not expect ydata to be passed to it. You might need
ObjectiveFunction = @(x)parameterized_objective(x,xdata,ydata);
x = simulannealbnd(ObjectiveFunction,X0,lb,ub)
having changed parameterized_objective to expect ydata