next up previous
Next: Running a simulation Up: No Title Previous: No Title

Entering an equation

Here we will enter in a differential equation and use AUTO to compute the bifurcation diagram. The equations that we want to study is the famous Hodgkin-Huxley model:

\begin{eqnarray*}C\frac{dV}{dt} &=& -g_L(V-E_L) -g_{Na} m^3h(V-E_{Na}) -g_K n^4
...
...& a_h(V)(1-h)-b_h(V)h \\
\frac{dn}{dt} &=& a_n(V)(1-n)-b_n(V)n
\end{eqnarray*}


The first thing you should do to analyze this is to create an ODE file which is a text file that XPPAUT use to solve differential equations. Here is the file

#  hhh.ode 
par i=0
par ena=50  ek=-77  el=-54.4  gna=120  gk=36  gl=0.3  c=1  phi=1 
am(v)=phi*.1*(v+40)/(1-exp(-(v+40)/10))
bm(v)=phi*4*exp(-(v+65)/18)
ah(v)=phi*.07*exp(-(v+65)/20)
bh(v)=phi*1/(1+exp(-(v+35)/10))
an(v)=phi*.01*(v+55)/(1-exp(-(v+55)/10))
bn(v)=phi*.125*exp(-(v+65)/80)
v'=(I - gna*h*m^3*(v-ena)-gk*n^4*(v-ek)-gl*(v-el))/c
m'=am(v)*(1-m)-bm(v)*m
h'=ah(v)*(1-h)-bh(v)*h
n'=an(v)*(1-n)-bn(v)*n
init v=-65  m=.05  h=0.6  n=.317  
done
The file is typed in pretty much the same way you would if you were writing the equations; XPP is too stupid to recognize spaces for multiplication, so you have to put the ``*'' sign between quantities. Functions such as am(V) are defined in the obvious fashion. Parameters are declared with the par statement. They can be separated by spaces or commas. The ``='' sign, the parameter name, and its starting value must have NO spaces between them.

THIS IS WRONG:

par gl = .3

THIS IS RIGHT:

par gl=.3

Initial data can be defined with the init statement. Each file must end with a done statement. Any line that starts with a # is a comment and ignored.



G. Bard Ermentrout
1999-09-15