Re: [R] using and event in deSolve

2013-02-23 Thread Thomas Petzoldt
Hi Jannetta, as far as I can see, your implementation was almost ;-) correct, except that: init[2] <- init[1] + d should be: init[2] <- init[2] + d The root function with: return(init[1]-30) is correct, because this triggers an event when init[1]-30 crosses the zero line, i.e. when ini

[R] using and event in deSolve

2013-02-21 Thread Jannetta Steyn
Hi All Having been pointed the use of events and roots in deSolve, I was able to implement the Izchikevich model of spiking neurons. However, I'm not too sure of defining the event. The deSolve documentation says: An event is triggered when the ball hits the ground (height = 0) Then velocity (y2)