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) V(0)=-70 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 p(t)=heav(t_off-t)*heav(t-t_on) # track the current aux ibar=p(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.