i need help about ode23 and subfunction topic
function xdot=train(t,x) alfa=0.3; beta=0.13; gama=0.16; Ua=1; Ub=2; xdot=[x(2);((2/pi)*(atan((x-4)/0.05)+atan((x-2)/0.05))-alfa-beta*abs(x(2))-gama*(x(2)^2)+Ua-Ub)];
and the plot function
[t,x]=ode23('train',[0,0.1],[0;0]); subplot(2,1,1);plot(t,x(:,1)) subplot(2,1,2); plot(t,x(:,2))
and the error is
??? Error using ==> odearguments at 116 TRAIN returns a vector of length 3, but the length of initial conditions vector is 2. The vector returned by TRAIN and the initial conditions vector must have the same number of elements.
Error in ==> ode23 at 172 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> main1 at 1 [t,x]=ode23('train',[0,0.1],[0;0]);
THANKS FOR YOUR HELP.....