|
|
c931(金币+5): 多谢~~,我用的mathematica,新手 不知道用哪个命令~ 2011-08-25 16:13:19
好吧,我就举个例子好了a=0.2 b=0.3 d/c=0.8 x(0)=1.2 y(0)=1.6
>> fun=@(t,x)[(0.2*(x(1)-x(2))+0.3)/x(1);0.8*(x(1)-x(2))];
[t,X]=ode45(fun,[0 20],[1.2 1.6]);
plot(t,X(:,1),t,X(:,2));
legend({'t-x','t-y'}) |
|