 close all;
resting = [0.3177    0.0529    0.5962  -59.9995];
first = resting;
first(4) = -47;

N = 20;
ySS = zeros(1,N*4);
ySS(1:4:end) = resting(1);
ySS(2:4:end) = resting(2);
ySS(3:4:end) = resting(3);
ySS(4:4:end) = resting(4);
ySS(4) = first(4);

[t,x]=ode45('hhode_parc2',[0 30],ySS);
figure
for i=1:N-5
    subplot(2,1,1);
    plot(t, x(:,(i-1)*4+4));
    ylim([-80,60])
    subplot(2,1,2);
    plot(t, x(:,(i-1)*4+3),'r', t, x(:,(i-1)*4+2),'k', t, x(:,(i-1)*4+1),'b')
    legend('h','m','n');
    ylim([0 1]);
    pause(0.1);
    %waitforbuttonpress;
end