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

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 = (1000*(E-V)/R_M + I_0*f(t))/C_M
V(0)=-70
# I in microamps/cm^2 C_m in microfarads/cm^2 R_M in Ohm cm^2 E in mV
# t in msecs
parameter R_M=10000, C_m=1, I_0=2, E=-70
parameter t_on=5, t_off=10
# define a pulse function
f(t)=heav(t_off-t)*heav(t-t_on)
# track the current
aux ibar=f(t)*I_0
done
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.


next up previous
Next: Running the simulation Up: Numerical solution of passive Previous: Numerical solution of passive
G. Bard Ermentrout
1/10/1998