MATLAB中用ODE45解两个2阶非线性常微分方程组,Command Window出现警告:写在补充里面>> [t,y]=ode45(@RK4_shiyan01,[0:0.001:1000],[0,0,0,0])Warning: Failure at t=1.768731e-001. Unable to meet integration tolerances without reducin
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/05 11:37:38
![MATLAB中用ODE45解两个2阶非线性常微分方程组,Command Window出现警告:写在补充里面>> [t,y]=ode45(@RK4_shiyan01,[0:0.001:1000],[0,0,0,0])Warning: Failure at t=1.768731e-001. Unable to meet integration tolerances without reducin](/uploads/image/z/15207640-16-0.jpg?t=MATLAB%E4%B8%AD%E7%94%A8ODE45%E8%A7%A3%E4%B8%A4%E4%B8%AA2%E9%98%B6%E9%9D%9E%E7%BA%BF%E6%80%A7%E5%B8%B8%E5%BE%AE%E5%88%86%E6%96%B9%E7%A8%8B%E7%BB%84%2CCommand+Window%E5%87%BA%E7%8E%B0%E8%AD%A6%E5%91%8A%EF%BC%9A%E5%86%99%E5%9C%A8%E8%A1%A5%E5%85%85%E9%87%8C%E9%9D%A2%3E%3E+%5Bt%2Cy%5D%3Dode45%28%40RK4_shiyan01%2C%5B0%3A0.001%3A1000%5D%2C%5B0%2C0%2C0%2C0%5D%29Warning%3A+Failure+at+t%3D1.768731e-001.++Unable+to+meet+integration+tolerances+without+reducin)
MATLAB中用ODE45解两个2阶非线性常微分方程组,Command Window出现警告:写在补充里面>> [t,y]=ode45(@RK4_shiyan01,[0:0.001:1000],[0,0,0,0])Warning: Failure at t=1.768731e-001. Unable to meet integration tolerances without reducin
MATLAB中用ODE45解两个2阶非线性常微分方程组,Command Window出现警告:写在补充里面
>> [t,y]=ode45(@RK4_shiyan01,[0:0.001:1000],[0,0,0,0])
Warning: Failure at t=1.768731e-001. Unable to meet integration tolerances without reducing the step
size below the smallest value allowed (4.440892e-016) at time t.
> In ode45 at 371
方程如下:
function dx=RK4_shiyan01(t,x)
a1=4.73001;a2=7.85320;b1=0.005;b2=0.2;b3=10;b4=50;b5=7.6;b6=20;b7=0.05;b8=20;b12=0.8355;b21=-0.8355;e=-7.5451;g11=-12.3025;g22=-46.0525;
h11=-6.1513;h12=-8.3806;h21=-6.7096;h22=-23.0263;d=0.083;
dx=[x(3);x(4);
-(a1^4+(b5^2-0.5*b4)*g11)*x(1)-b4*e*x(2)-b1*a1^4*x(3)-2*b2^0.5*b5*b12*x(4)+d*b6^2*sin(b6*t)*(sinh(a1)-sin(a1)-((cosh(a1)-cos(a1))/(sinh(a1)-sin(a1)))*(cos(a1)+cosh(a1)-2)/a1-b7*g11*x(1)*(2*b5*sin(b8*t)+b2^0.5*b8*cos(b8*t))+b2^0.5*b8*b7*(h11*x(1)+h12*x(2))*cos(b8*t)-2*b2^0.5*b7*b12*x(4)*sin(b8*t)-b3*((x(1)^2+2*b1*x(1)*x(3))*g11+((x(2)^2+2*b1*x(2)*x(4))*g22)*x(1)*g11));
-(a2^4+(b5^2-0.5*b4)*g22)*x(2)-b4*e*x(1)-b1*a2^4*x(4)-2*b2^0.5*b5*b21*x(3)+d*b6^2*sin(b6*t)*(sinh(a2)-sin(a2)-((cosh(a2)-cos(a2))/(sinh(a2)-sin(a2)))*(cos(a2)+cosh(a2)-2)/a2-b7*g22*x(2)*(2*b5*sin(b8*t)+b2^0.5*b8*cos(b8*t))+b2^0.5*b8*b7*(h21*x(1)+h22*x(2))*cos(b8*t)-2*b2^0.5*b7*b21*x(3)*sin(b8*t)-b3*((x(1)^2+2*b1*x(1)*x(3))*g11+((x(2)^2+2*b1*x(2)*x(4))*g22)*x(2)*g22))];
MATLAB中用ODE45解两个2阶非线性常微分方程组,Command Window出现警告:写在补充里面>> [t,y]=ode45(@RK4_shiyan01,[0:0.001:1000],[0,0,0,0])Warning: Failure at t=1.768731e-001. Unable to meet integration tolerances without reducin
警告的翻译:
无法满足积分条件,因此在时间t=1.768731e-001s处无法积分
帮你运行了一下,原因是在1.768731e-001s处,有个值趋于负的无穷大,因此无法积分
可能的原因:
1.方程出错;
2.时间t的范围;
3.初值