Next: Running the simulation
Up: Numerical solution of passive
Previous: Numerical solution of passive
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:
- heav(t) is the Heaviside step function which is 0 for t<0
and 1 for t>0. Thus f(t) is a pulse function which turns on at
t=ton and turns off at t=toff.
- V(0)=-70 is the initial condition.
- aux means that what follows is something that we want to
plot but does not satisfy a differential equation.
- XPPAUT is case insensitive so upper and lower cases are
synonymous.
- # means that what follows is a comment.
- param ... defines parameters
- dV/dt = ... tells XPPAUT that this is a differential
equation
- done tells the parser the file is done.
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: Running the simulation
Up: Numerical solution of passive
Previous: Numerical solution of passive
G. Bard Ermentrout
1/10/1998