测试灌水版 #77112 层求助

为何出错

楼主 · 1 楼
我用ode45计算如下非线性常微分方程组初值问题:

y'=z^3-x^2*y-x^2
z'=x*z^2-y^4+3x
y(2)=5
z(2)=3

求解区间[2,5], 步长0.25

先编如下函数
function z=ef10(x,y)
z(1)=y(2)^3-x*x*y(1)-x*x;
z(2)=x*y(2)*y(2)-y(1)^4+3*x;
z=z';

然后使用ode45计算
[x,y]=ode45('ef10',2*ones(1,13)+0.25*(0:12),[5 3])

最后结果报错

Warning: Failure at t=2.109049e+000. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (7.492849e-015) at time t.
(Type "warning off MATLAB:ode45:IntegrationTolNotMet" to suppress this warning.)
> In D:\MATLAB6p5\toolbox\matlab\funfun\ode45.m at line 335

x = 2


y = 5 3


请那位指点一下,为什么会出错?
2 楼
我知道了,数据太大,溢出了.