楼主: jixiezhuangbei
4702 2

[问答] Failure at t=5.422028e-006. Unable to meet integration tolerances without reduc [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

初中生

23%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
68 点
帖子
9
精华
0
在线时间
11 小时
注册时间
2015-4-4
最后登录
2015-11-15

楼主
jixiezhuangbei 发表于 2015-4-13 16:07:13 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Warning: Failure at t=5.422028e-006.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.355253e-020) at time t.
> In ode45 at 355
  In ODE45_main at 4
Warning: Function call Xlabel invokes inexact match D:\MATLAB7\toolbox\matlab\graph2d\xlabel.m.

> In ODE45_main at 15
Warning: Function call Ylabel invokes inexact match D:\MATLAB7\toolbox\matlab\graph2d\ylabel.m.

> In ODE45_main at 15
The element type "name" must be terminated by the matching end-tag "</name>".
Could not parse the file: d:\matlab7\toolbox\ccslink\ccslink\info.xml
>>
【 Failure at t=5.422028e-006.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.355253e-020) at time t.】针对这一句,可否人为的设置,使程序能够继续运行下去呢?
比如减小step size?
或增大integration tolerances?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Integration Tolerance Failure without ration without

步长太小.jpg (278.64 KB)

步长太小.jpg

沙发
jixiezhuangbei 发表于 2015-4-13 16:10:20
程序
ODE45_main:

clc;clear
tspan=[0,180];
y0=[1e-5;0;0;0;0];
[t,y]=ode45('ODE45_fun',tspan,y0);

[m,n]=size(y);
for i=1:m
    y(i,6)=-178075801.6*y(i,4)*y(i,5)+490910.1296*y(i,3)*y

(i,2)+1128974.05+7481.104004*sin(2.047*t(i));
    %sin(2.047*t);
%    y(i,4)=-3*y(i,2)*y(i,3)-4*y(i,1)*y(i,3)+8*y(i,1)*y(i,3);
end
data=[t,y];
save ODE45_data.txt data -ascii
subplot(2,3,1),plot(t,y(:,1)),title('y(1)')
Xlabel('t');Ylabel('y');
subplot(2,3,2),plot(t,y(:,2)),title('y(2)')
Xlabel('t');Ylabel('y');
subplot(2,3,3),plot(t,y(:,3)),title('y(3)')
Xlabel('t');Ylabel('y');
subplot(2,3,4),plot(t,y(:,4)),title('y(4)')
Xlabel('t');Ylabel('y');
subplot(2,3,5),plot(t,y(:,5)),title('y(5)')
Xlabel('t');Ylabel('y');
subplot(2,3,6),plot(t,y(:,6)),title('y(6)')
Xlabel('t');Ylabel('y');
% plot(t,y(:,1),'bo',t,y(:,2),'rx',t,y(:,3),'gv',t,y(:,4),'r-');
grid on


ODE45_fun:

function  dy=ODE45_fun(t,y)
dy(1)=-1.918298553*y(3)*y(4)-121.6697369*y(5)*y(2)+0.006472085*y(2)*y

(2)+15.25250926*y(5)*y(5)-0.518363603*sin(2.047*t)+0.001124759;

dy(2)=0.007229182*y(5)*y(1)-0.013867729*y(3)-0.005151943*sin

(2.047*t)+33.43424564*y(4)*y(5)-0.092169794*y(3)*y(2)-0.698266828;

dy(3)=72.10986245*y(2)+0.52129529*y(4)*y(1)+0.025471074*y(3)+921.886526*y(4)/y(1)-

0.47870471*y(4)+0.025471074*y(1)*t-0.38220722*cos(2.047*t)-4.62279911;

dy(4)=-57.37263009*y(5)+0.001053501*y(3)*y(1)+20.28825016/y(1)-0.001053501*y

(3)+0.064741605*y(4)+20.28825016*t-0.006201915*sin(2.047*t)-3651.904822;
  
dy(5)=0.017284293*y(4)+0.00278644*y(1)*y(2)-0.551218454*y(2)*y(5)*y

(5)+0.010839281*y(2)*y(2)*y(5)+0.020353114*cos(2.047*t)+0.110594984;

dy=[dy(1);dy(2);dy(3);dy(4);dy(5)];

藤椅
jixiezhuangbei 发表于 2015-4-14 08:25:45
ode23
ode45
ode113
ode15s
ode23s
ode23t
ode23tb
以上都不行

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-26 09:48