| 5 | 1/1 | 返回列表 |
| 查看: 749 | 回復(fù): 4 | |||
[交流]
【求助】求解常微分方程出現(xiàn)警告,求助
|
|
求解如下微分方程時(shí),出現(xiàn)警告 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. 無法得到要求的解區(qū)間,請(qǐng)幫忙分析一下。 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]; |
» 搶金幣啦!回帖就可以得到:
+1/643
+5/305
+1/84
+1/78
+1/69
+2/44
+2/38
+2/32
+2/24
+1/17
+2/16
+1/15
+1/9
+1/8
+1/7
+1/7
+1/4
+1/3
+1/3
+1/1
版主 (職業(yè)作家)
鐵桿木蟲 (著名寫手)
|
我也不知道你那常微分方程組寫得對(duì)不對(duì)?再核實(shí)下。 按照你的方程組形式和初始條件幫你簡化了下,兩三行就可以解決問題了。 --------------------------------------------------------------------------------------------------- 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)) --------------------------------------------------------------------------------------------------- 但結(jié)果同樣遇到問題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提示,也不表示一定是錯(cuò)誤 |
鐵桿木蟲 (著名寫手)
| 5 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|