function hh
%options=odeset()
[t,y]=ode23t(@fun,0:0.01:5,0.5)
plot(t,y)
function dy=fun(t,y)
dy=(y^2+5)*(t+6);
结果:
Warning: Failure at t=9.940611e-002. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (3.531614e-016) at time t.
> In ode23t at 726
In try28 at 3
用了ode23t
修改了步长和总时间,
还是出现Warning: Failure at t=2.813557e-001. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (9.995763e-016) at time t.