Too many Input arguments
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Solver Outputs and Iterative Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!