24小时热门版块排行榜    

查看: 913  |  回复: 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的回帖

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的回帖
查看全部 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的回帖

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的回帖

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的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[公派出国] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 aOn84t7OD1JN 2026-08-19 3/150 2026-08-19 22:40 by BqkHsOAGISWU
[基金申请] 今天基金会出结果吗?20260819 +13 kkkl_v 2026-08-19 13/650 2026-08-19 22:37 by 宝贝虫子
[教师之家] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +3 aOn84t7OD1JN 2026-08-19 4/200 2026-08-19 22:31 by BqkHsOAGISWU
[博后之家] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +4 PnssoZglMj3v 2026-08-19 4/200 2026-08-19 22:28 by BqkHsOAGISWU
[考博] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +4 PnssoZglMj3v 2026-08-19 5/250 2026-08-19 22:19 by BqkHsOAGISWU
[博后之家] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 PnssoZglMj3v 2026-08-19 4/200 2026-08-19 22:16 by BqkHsOAGISWU
[基金申请] filecode,4个jtjc了 +11 ziyangfang 2026-08-19 13/650 2026-08-19 21:28 by aasahr
[基金申请] 欢迎发来filecode的Mz6后的代码验证其规律 +54 医学老男孩 2026-08-13 121/6050 2026-08-19 20:28 by 医学老男孩
[基金申请] 今天放榜没戏了吧 +4 yuleib84 2026-08-19 5/250 2026-08-19 19:52 by hhs666
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 cHIDTWCTtLlG 2026-08-19 6/300 2026-08-19 18:52 by oCMhZAsgNFoO
[考博] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 PnssoZglMj3v 2026-08-19 5/250 2026-08-19 17:42 by oCMhZAsgNFoO
[基金申请] filecode=后面第一个是大写字母 +10 wangze12014 2026-08-14 12/600 2026-08-19 16:56 by 苦难博士
[基金申请] 2027广东省杰青 +4 奶牛小黑 2026-08-15 10/500 2026-08-19 11:02 by wanfengnew
[基金申请] 朋友圈看到的 +6 wangzilk 2026-08-18 8/400 2026-08-19 10:55 by Haru815
[基金申请] 快农历七夕节了,轻松一下,男人悄悄话,女施主请不要进来。 +6 Tide man 2026-08-14 7/350 2026-08-19 09:56 by ZJTJZ
[基金申请] 93BebMhtakh前后11位开头都是大写 +4 且听虎啸 2026-08-17 5/250 2026-08-18 00:49 by 蔡棒棒菂
[基金申请] 感觉是下周放榜了 +6 angus9576 2026-08-17 11/550 2026-08-17 23:57 by angus9576
[基金申请] 今天系统多次维护,明天很可能放榜! +8 zju2000 2026-08-16 9/450 2026-08-17 12:20 by lmz0216
[精细化工] 招聘 金属平磨液,抛光液研发工程师 +3 小天0311 2026-08-14 3/150 2026-08-16 07:31 by H9PLUS
[基金申请] 重要来源:本周末出结果 +10 瞬息宇宙 2026-08-12 10/500 2026-08-13 15:46 by likettle
信息提示
请填处理意见