蓝云天 发表于 2011-12-10 23:11

这个非自治系统的程序怎么总是出错么?谢谢

options = odeset('RelTol',1e-4,'AbsTol',1e-4);

=ode45(@function,0:2*pi/100:400,,options);
++++++++++++++++++++++++++
function xdot=function(t,x)

xdot(1)=(1e+6)-0.02*x(1)-((3.5e-5)+(2e-5)*cos(2*pi*t))*x(1)*x(3);
xdot(2)=((3.5e-5)+(2e-5)*cos(2*pi*t))*x(1)*x(3)-(0.02+45.6)*x(2);
xdot(3)=45.6*x(2)-73.02*x(3);

xdot=xdot';
end
+++++++++++++++++++++++
Warning: Failure at t=4.401339e+000.Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.421085e-014) at time t.
> In ode45 at 355
In measles2attractor at 19
Warning: Imaginary parts of complex X and/or Y arguments ignored.
> In measles2attractor at 21
页: [1]
查看完整版本: 这个非自治系统的程序怎么总是出错么?谢谢