本人MATLAB小白,求助微分方程求解:
函数定义:
function yp = ftest421(x,y)
yp=x.^2./y-x.*cos(y);
执行出错:
>> [x,y]=ode23('ftest421',0,4,1)
Error using odearguments (line 81)
The last entry in tspan must be different from the first entry.
Error in ode23 (line 113)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
>> [x,y]=ode23('ftest421',0,4,1)
Error using odearguments (line 81)
The last entry in tspan must be different from the first entry.
Error in ode23 (line 113)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
求解答!