# connor-stevens model par i0=-15 ip=25 ton=50 toff=200 init v=-74 M=0.004 H=0.986 init N=.1 A=0.509 B=0.426 par ek=-72 ena=55 ea=-75 el=-17 par gna=120 gk=20 ga=47.7 gl=0.3 par ms=-5.3 hs=-12 ns=-4.3 # Hodgkin-Huxley with shifts - 3.8 is temperature factor am(v)=-.1*(v+35+ms)/(exp(-(v+35+ms)/10)-1) bm(v)=4*exp(-(v+60+ms)/18) minf(v)=am(v)/(am(v)+bm(v)) taum(v)=1/(3.8*(am(v)+bm(v))) ah(v)=.07*exp(-(v+60+hs)/20) bh(v)=1/(1+exp(-(v+30+hs)/10)) hinf(v)=ah(v)/(ah(v)+bh(v)) tauh(v)=1/(3.8*(ah(v)+bh(v))) an(v)=-.01*(v+50+ns)/(exp(-(v+50+ns)/10)-1) bn(v)=.125*exp(-(v+60+ns)/80) ninf(v)=an(v)/(an(v)+bn(v)) # Taun is doubled taun(v)=2/(3.8*(an(v)+bn(v))) # now the A current ainf(v)=(.0761*exp((v+94.22)/31.84)/(1+exp((v+1.17)/28.93)))^(.3333) taua(v)=.3632+1.158/(1+exp((v+55.96)/20.12)) binf(v)=1/(1+exp((v+53.3)/14.54))^4 taub(v)=1.24+2.678/(1+exp((v+50)/16.027)) i(t)=i0+ip*heav(t-ton)*heav(toff-t) # Finally the equations... v'=-gl*(v-el)-gna*(v-ena)*h*m^3-gk*(v-ek)*n^4-ga*(v-ea)*b*a^3+i(t) M'=(minf(v)-m)/taum(v) H'=(hinf(v)-h)/tauh(v) N'=(ninf(v)-n)/taun(v) A'=(ainf(v)-a)/taua(v) B'=(binf(v)-b)/taub(v) @ meth=qualrk,total=250,dt=.25,xlo=0,xhi=250,ylo=-80,yhi=25 done