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

Inp = 0;
BCL = 25;

tstep = 1;
t_end = 600;

V = -43.2572;
f = 0.9343;
h = 0.1985;
p = 0.2146;
q = 0.0136;
d = 0.0129;

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

s0 = [V;f;h;p;q;d];

[T,S] = ode23('deRHS',tspan, s0, odeset('maxstep',1));  
V = S(:,1);
f = S(:,2);
h = S(:,3);
p = S(:,4);
q = S(:,5);
d = S(:,6);


figure(1)
subplot(2,1,1)
plot(T,V)
subplot(2,1,2)
plot(T,f,'b',T,h,'r',T,p,'g',T,q,T,d)


