% This is a simple ode integrator for the MS equations
% it is set up to be easily modified to use for other dynamics
clear all
ML_parameters

Inp = 14;
BCL = 200;
tstep = 1;
t_end = 500;
V = -49;
W = 0;

%specify the output points
tspan = [0:tstep:t_end];

s0 = [V;W];

[T,S] = ode23('deRHS',tspan, s0, odeset('maxstep',1));  
V = S(:,1);
W = S(:,2);

ML_nullclines

figure(1)
subplot(2,1,1)
plot(T,V,'r','linewidth',2)
xlabel('time','fontsize',16)
ylabel('{\it V}','fontsize',16)
subplot(2,1,2)
plot(V,W,'linewidth',2)
hold on
plot(Vt,Vn,'b--',Vt,Wn,'r--')
axis(wrange)
xlabel('V','fontsize',16)
ylabel('W','fontsize',16)

