24小时热门版块排行榜    

查看: 690  |  回复: 4
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

micronano

金虫 (正式写手)


[交流] 【求助】求解常微分方程出现警告,求助

求解如下微分方程时,出现警告
Warning: Failure at t=4.893789e-005.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.738623e-019) at time t.
无法得到要求的解区间,请帮忙分析一下。

Y0=[0.0001; 15.2571];
tspan=[0.4894e-4 0];
[t,YY]=ode23s('DYdt',tspan,Y0);
plot(YY(:,1),t)


function Yd=DYdt(t,Y)
Yd=[Y(2); (1+Y(2)^2)/Y(1)+ 9.4597e+008*(1+Y(2)^2)^1.5];
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

» 抢金币啦!回帖就可以得到:

查看全部散金贴

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

free--fire

新虫 (小有名气)


micronano(金币+2): 2011-03-14 16:35:19
引用回帖:
Originally posted by micronano at 2011-03-11 15:44:43:
求解如下微分方程时,出现警告
Warning: Failure at t=4.893789e-005.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.738623e-019) at time t.
...

方程好像写得有问题
另外就是最好将数据处理一下,不要一个方程里面系数差别太大
3楼2011-03-14 09:07:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 5 个回答
micronano(金币+2): 2011-03-14 16:35:06
引用回帖:
Originally posted by micronano at 2011-03-11 15:44:43:
求解如下微分方程时,出现警告
Warning: Failure at t=4.893789e-005.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.738623e-019) at time t.
...

好像是微分方程奇异,求解不下去了。
2楼2011-03-11 15:55:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

jswoo

铁杆木虫 (著名写手)


★ ★
xiegangmai(金币+2): 谢谢应助! 2011-03-14 12:37:04
micronano(金币+5): 2011-03-14 16:35:29
引用回帖:
Originally posted by micronano at 2011-03-11 15:44:43:
求解如下微分方程时,出现警告
Warning: Failure at t=4.893789e-005.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.738623e-019) at time t.
...

我也不知道你那常微分方程组写得对不对?再核实下。

按照你的方程组形式和初始条件帮你简化了下,两三行就可以解决问题了。
---------------------------------------------------------------------------------------------------
function main
fun = @(t,Y)[Y(2);(1+Y(2)^2)/Y(1)+9.4597e+08*(1+Y(2)^2)^1.5];
[t,Y] = ode45(fun,[0.4894e-4 0],[0.0001 15.2571]);
plot(Y(:,1),Y(:,2))
---------------------------------------------------------------------------------------------------
但结果同样遇到问题Warning: Failure at t=4.893789e-005.  Unable to meet integration tolerances
without reducing the step size below the smallest value allowed
(1.738623e-019) at time t.
-------------------------------------------
分析:
1. 按提示需要减小step size
2. 检查你的方程和初值条件,如果都没问题,那么即使warning提示,也不表示一定是错误
4楼2011-03-14 10:01:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

jswoo

铁杆木虫 (著名写手)



xiegangmai(金币+1): 鼓励讨论交流! 2011-03-14 12:37:21
micronano(金币+1): 2011-03-14 16:36:14
引用回帖:
Originally posted by micronano at 2011-03-11 15:44:43:
求解如下微分方程时,出现警告
Warning: Failure at t=4.893789e-005.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.738623e-019) at time t.
...

这个方程有点怪
dy(1)=Y(2);      
dy(2)=(1+Y(2)^2)/Y(1)+9.4597e+08*(1+Y(2)^2)^1.5;  
方程组里居然连自变量都没
再核实核实方程组可靠否?
5楼2011-03-14 10:13:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见