引用:
作者: fanxing39
回复1楼问题:
function du=duffin(t,x)
变成 function du=duffin(t,x,epsilon)
然后把“epsilon=0.1;”去掉,就可以了
|
这样好像不行啊
调用solver的时候怎么做?
我用 [t,x]=ode45('duffin',[0,10],[0.1,0.1,2],options,0.1)
给出错误提示
??? Error using ==> duffin
Too many input arguments.
Error in ==> D:\MATLAB6p5\toolbox\matlab\funfun\private\odearguments.m
On line 104 ==> f0 = feval(ode,t0,y0,args{:});
Error in ==> D:\MATLAB6p5\toolbox\matlab\funfun\ode45.m
On line 155 ==> [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, args, ...
其中,duffin的定义如你所说:ft: