# passive.ode # passive membrane equation with an applied current pulse # of amplitude Io that is on between t_on and t_off # # membrane eq and initial condition dV/dt = (-(V-Erest)/Rm + Io*f(t))/Cm V(0)=-70 # # parameter values par Rm=10 Cm=1 Io=2 Erest=-70 par t_on=5 t_off=10 # # step function for current f(t)=heav(t-t_on)*heav(t_off-t) # # track the current aux Iapp=Io*f(t) # done