Skip to content
Prev 317251 / 398503 Next

A Hodgkin Huxley Model

Jannetta Steyn <jannetta <at> henning.org> writes:
I'm not sure what "if v=30 then v<-c else u<-u+d" means. The first clause
is OK: I can imagine you want to implement a resetting event where
when v crosses 30, it gets reset to c: to do this part, see ?events in
the deSolve package (you are looking for "roots" in particular), and
the examples in ?lsodar.  The "else" clause doesn't make much sense to
me, as v will essentially *always* (except at particular, non-generic
time points) be not-equal to 30 ... it would probably make sense to me
if I went back to read the original paper, but that's too much work
...

(By the way, the semicolons at the ends of lines are unnecessary;
they're harmless, but usually the mark of a recovering MATLAB
user ...)