i am trying to solve the optimization problem by using function but i am getting an error in it.
function f=bench_func(x)[ps,d]=size(x); % The optimal control of a non-linear stirred tank reactor.
tol=1.0e-01; tspan=[0 0.78]; yo =[0.09 0.09]'; u=x; %u should be passed here.
options = odeset('RelTol',tol); [T,Y] = ode45(@(t,y) intgrl(t,y,u),tspan,yo,options); f=sum(sum(Y.^2,2)+(0.1)*(u).*(u));
error
Error in bench_func (line 141) [T,Y] = ode45(@(t,y) intgrl(t,y,u),tspan,yo,options);
please help me to solve this error.
Best Answer