gwei 发表于 2007-5-12 14:34

请帮忙看下这个程序

r=ones(1,10);
=ode45('funyp',,1);
=ode45('funym',,1);
e=yp-ym;
=ode45('fundc',,1);
=ode45('fundd',,1);
u=c*r+d*yp;

function dy=funyp(t,y)
a=0.005;b=0.005;
r=ones(1,100);
dy=-a*y+b*r;

function dy=funym(t,y)
r=ones(1,10);
dy=-0.1*y+0.1*r;


function dy=fundc(t,y)
dy=-r*e;

function dy=fundd(t,y)
dy=-yp*e;
刚开始学matlab,请帮小弟看下哪有问题,多谢了!
页: [1]
查看完整版本: 请帮忙看下这个程序