24小时热门版块排行榜    

查看: 803  |  回复: 0

xwndf250

银虫 (小有名气)

[求助] 步长问题

我做了个模型:
function dy=bushi1(t,y)
a=5;b=10;u1=0.2;u2=1;k1=2;k2=1;
dy=[u1*y(1)*y(2)+2*k1*y(1)*y(2)*y(2)-a*y(1)-k2*y(1)*y(2)*y(2);
    b*y(2)-u2*y(1)*y(2)+2*k2*y(1)*y(2)*y(2)];
end
命令作图
ts=1:1:200;
y0=[2,25];
[t,y]=ode45('bushi1',ts,y0)
plot(t,y(:,1),'r',t,y(:,2),'b')

出现:“Warning: Failure at t=1.001176e+000.  Unable to meet integration tolerances without reducing the step size below the smallest value allowed (3.552714e-015) at time t.”
求解决。
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 xwndf250 的主题更新
信息提示
请填处理意见