lingtian199063
2009-11-04, 15:47
我建立了一个函数文件 保存在work中
function f=fun3(x,y)
f=[-2*y+2*x.^2+2*x]
end
然后进行了如下调用
[x,y]=ode23('fun3',[0,0.5],1)
??? Error using ==> feval
Undefined function or method 'fun3' for input arguments of type 'double'.
Error in ==> odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode23 at 172
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
计算常微分方程,但是却一直出错。
请高手帮忙,谢谢!
function f=fun3(x,y)
f=[-2*y+2*x.^2+2*x]
end
然后进行了如下调用
[x,y]=ode23('fun3',[0,0.5],1)
??? Error using ==> feval
Undefined function or method 'fun3' for input arguments of type 'double'.
Error in ==> odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode23 at 172
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
计算常微分方程,但是却一直出错。
请高手帮忙,谢谢!