Too many input arguments, which arguments should I remove?
이전 댓글 표시
Hi all, on the attached code, I am trying to use a for-loop and ode45 to solve odes and an algebraic equation in 31 iterations. However, I get an error message
Error using my_odesloop>odes
Too many input arguments.
Error in my_odesloop>@(t,y)odes(t,y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) (line 46)
sol(j) = ode45(@(t,y) odes(t,y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z),t,y0);
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 my_odesloop (line 46)
sol(j) = ode45(@(t,y) odes(t,y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z),t,y0);
I don't know which arguments to remove.
Please help.
댓글 수: 2
KSSV
2018년 10월 24일
YOur code is very buggy.......need lot's of changes.....what you are trying actually?
Dursman Mchabe
2018년 10월 24일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!