baggio198310
2007-11-29, 15:25
请各位大侠帮帮我
在chap1_2.m中的程序:
………………
………………
………………
[tt,xx]=ode45('chapl_2f',tSpan,xk,[],para);
………………
在chap1_2f.m中的程序是:
function dy =chap1_2f(t,y,flag,para)
u=para;
J=0.0067;
B=0.1;
dy=zeros(2,1);
dy(1)=y(2);
dy(2)=-(B/J)*y(2)+(1/J)*u;
可是运行后总是报错:
??? Error using ==> feval
Undefined command/function 'chapl_2f'.
Error in ==> funfun\private\odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> chapl_2 at 14
[tt,xx]=ode45('chapl_2f',tSpan,xk,option,para);
敢问各位高手是什么问题?
在chap1_2.m中的程序:
………………
………………
………………
[tt,xx]=ode45('chapl_2f',tSpan,xk,[],para);
………………
在chap1_2f.m中的程序是:
function dy =chap1_2f(t,y,flag,para)
u=para;
J=0.0067;
B=0.1;
dy=zeros(2,1);
dy(1)=y(2);
dy(2)=-(B/J)*y(2)+(1/J)*u;
可是运行后总是报错:
??? Error using ==> feval
Undefined command/function 'chapl_2f'.
Error in ==> funfun\private\odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> chapl_2 at 14
[tt,xx]=ode45('chapl_2f',tSpan,xk,option,para);
敢问各位高手是什么问题?