next up previous
Next: Running the simulation Up: Numerical solution of Previous: Numerical solution of

Writing an ODE file

To simulate this in XPPAUT we must create an ODE file which has information such as the number of equations, the parameters, initial conditions, names of variables and function definitions. The following file does the trick:

# passive membrane with step function current: passive.ode
dV/dt = ((E-V)/R_M + 1000*I_0*p(t))/(C_M*1000)
parameter R_M=10000, C_m=1e-6, I_0=2e-6, E=-70
parameter t_on=5, t_off=10
# define a pulse function
# track the current
aux ibar=p(t)*I_0

There is little explanation needed except for the following points:

Notes: (1) All the declarations at the beginning of each line can be abbreviated to their first letter; all others are ignored until a space is encountered. (2) Variables, functions, and parameters can have up to 9 letters. (3) There are at most 300 differential equations allowed, 200 parameters, and 50 functions.

Bard Ermentrout
Mon Jan 5 13:18:36 EST 1998