Too many Input arguments
显示 更早的评论
I am trying to optimize the attached problem, but I always receive these errors
Error using objfuntest>@(X)ODEtest(X,g0,Isp,thrust)
Too many input arguments.
Error in odearguments (line 90)
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 115)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in objfuntest (line 12)
[t,x]=ode45(@(X)ODEtest(X,g0,Isp,thrust),tSpan,initial,options);%solve equations for
Optimization
Error in maintest>@(X)objfuntest
Error in fmincon (line 546)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in maintest (line 15)
mfopti=fmincon(myObjective,X0,A,b,Aeq,beq,lb,ub,nonlcon)
Caused by:
Failure in initial objective function evaluation. FMINCON cannot continue.
And I don't get it, because if I don't pass the parameters to my function I get the same error. But that would mean that I have to clear also the input X, so that I don't have any input, which makes no sense to me. Can anyone see my error of reasoning?
Thanks in advance
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!