声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1038|回复: 0

[编程技巧] 这个非自治系统的程序怎么总是出错么?谢谢

[复制链接]
发表于 2011-12-10 23:11 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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

[t x]=ode45(@function,0:2*pi/100:400,[1e+4 500 1000],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
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-20 00:12 , Processed in 0.077340 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表