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.