V=[-80:30];
alfan = 0.01*(V+55)./(1-exp(-(V+55)/10));
betan = 0.125*exp(-(V+65)/80);
alfam = 0.01*(V+40)./(1-exp(-(V+40)/10));
betam = 4*exp(-(V+65)/18);
alfah = 0.07*exp(-(V+65)/20);
betah = 1./(1+exp(-(V+35)/10));

t_n=1./(alfan+betan);
n_inf=alfan.*t_a;

t_m=1./(alfam+betam);
m_inf=alfam.*t_m;
t_h=1./(alfah+betah);
h_inf=alfah.*t_h;
subplot(311)
plot(V,t_m,V,m_inf)
subplot(312)
plot(V,t_n,V,n_inf)
subplot(313)
plot(V,t_h,V,h_inf)

%,V,alfam,V,betam,V,alfah,V,betah);