MATLAB中用ODE45解两个2阶非线性常微分方程组,Command Window出现警告:写在补充里面
>>[t,y]=ode45(@RK4_shiyan01,[0:0.001:1000],[0,0,0,0])Warning:Failureatt=1.768731e-001...
>> [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))]; 展开
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))]; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询