a=-195
for i=1:10
ySS=[0.5 0.5 0.5 a];
[t,x]=ode45('hhode',[0 20],ySS);
if max(x(:,4))>0 && max(x(:,4))<50
    plot(t, x(:,4),'r')
    title('Threshold Behavior');
    xlabel('Time (ms)');
    ylabel('Transmembrane Voltage (mV)');
    drawnow;
    hold on;
    

elseif max(x(:,4))>50
    plot(t, x(:,4),'y')
    title('Threshold Behavior');
    xlabel('Time (ms)');
    ylabel('Transmembrane Voltage (mV)');
    drawnow;
    hold on;
    
else
    plot(t, x(:,4),'k')
    title('Threshold Behavior');
    xlabel('Time (ms)');
    ylabel('Transmembrane Voltage (mV)');
    drawnow;
    hold on;
    
end
a=a+20;
title('Threshold Behavior');
    xlabel('Time (ms)');
    ylabel('Transmembrane Voltage (mV)');
end

