# 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