# Morris-Lecar reduced model 
dv/dt=(i+gl*(vl-v)+gk*w*(vk-v)+gca*minf(v)*(vca-v))/c
dw/dt=lamw(v)*(winf(v)-w)
ds/dt=alpha*k(v)*(1-s)-beta*s
minf(v)=.5*(1+tanh((v-v1)/v2))
winf(v)=.5*(1+tanh((v-v3)/v4))
lamw(v)=phi*cosh((v-v3)/(2*v4))
k(v)=1/(1+exp(-(v-vt)/vs))
param vk=-84,vl=-60,vca=120
param i=80,gk=8,gl=2, gca=4, c=20
param v1=-1.2,v2=18,v3=12,v4=17.4,phi=.066666667
param vsyn=120,vt=20,vs=2,alpha=1,beta=.25
# for type II dynamics, use v3=2,v4=30,phi=.04
# for type I dynamics, use v3=12,v4=17.4,phi=.06666667
v(0)=-24.22
w(0)=.305
s(0)=.056
# track some currents
done
