matlab用ode45解线性方程组。

我建立了一个函数,自认为没什么问题
function dydt =yoyo(t,y,P,D)
dydt=zeros(4,1);
dydt(1)=y(2);
dydt(3)=y(4);
dydt(2)=-47.74*y(1)-0.0174*y(1)*y(2)^2-0.868*P*y(1)-0.868*D*y(2);
dydt(4)=-50*y(1)+0.0185*y(1)*y(2)^2+0.924*P*y(1)+0.924*D*y(2);
采用
[t,y]=ode45(@yoyo,[0,100],[0;0;0;0],0,0)
调用后总是出现这样的提示
??? Error using ==> yoyo
Too many input arguments.
Error in ==> odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
到底是哪里错了啊,求助,谢谢

Respuestas (0)

Categorías

Etiquetas

Preguntada:

N/A
el 25 de Nov. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!