% 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
Noble_parameters

tstep = 2;
t_end = 2000;
V = -49;
m=.1;
h = .7;
n = .3;

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

s0 = [V;m;h;n];

[T,S] = ode23('deRHS',tspan, s0, odeset('maxstep',1));  
V = S(:,1);
m = S(:,2);
h = S(:,3);
n = S(:,4);

figure(1)
subplot(2,1,1)
plot(T,V)
subplot(2,1,2)
plot(T,m,'r',T,h,'b',T,n,'g')


