Hodgkin-Huxley Simulation with Javascript

C (muF/cm^2):
GKMax (mS/cm^2):
GNaMax (mS/cm^2):
Gm (mS/cm^2):
EK (mV):
ENa (mV):
VRest (mV):
V(0) (mV):
tStop (ms):
tInjStart (ms):
tInjStop (ms):
IDC (nA/cm^2):
IRand (nA/cm^2):
Itau (ms):


A simple browser/Javascript based simulation of Hodgkin's & Huxley's formulas for action potential generation in the squid giant axon. I suppose the source code is mostly self-explaining. I use the parameters from Christof Koch's book Biophysics of Computation, chapter 6, the formulas for forward and backward rates, and the differential equations for the three gating variables. For both these equations and the transmembrane current equation, I use explicit (forward) Euler for discretization and a time step of 0.025ms. The current consists of a DC (IDC) and a random component (uniform distribution (-1; 1), scaled by IRand), lowpass-filtered (1st order RC) with Itau.
Please drop me an email if there's anything wrong or unclear.