Displaying 2 results from an estimated 2 matches for "rootfun".
2013 Feb 21
1
using and event in deSolve
...return(init[1]-30)
}
event <- function(time, init, parms) {
with(as.list(c(init, parms)), {
init[2] <- init[1] + d
init[1] <- c
return(init)
})
}
out<-ode(y=init, times=times,
func=Izhikevich, parms=parms,
events=list(func=event, root=TRUE),
rootfun=root)
plot(out)
The reasoning behind my implementation was that if y[1] is 0 without being
set then init[1] will be 0 without being set. I need for the event to
trigger when init[1] is >= 30. Setting the root to init[1]+30 did not
produce the desired result, making it init[1]-30, produced some...
2013 Feb 10
4
A Hodgkin Huxley Model
Hi All
It has been suggested to me that the folks in this list might be able to
help me out of my misery.
As part of my learning curve to building a rather detailed model of a small
neurone complex I am implementing some existing models in R.
For the moment I want to implement the Izhikevich model as described in his
2003 paper. The equations are as follows:
v' = 0.04v^2 + 5v + 140 - u - I