vector continuous play - what to expect

Anything that doesn't fit elsewhere.
Post Reply
agidon20
Posts: 6
Joined: Sun Oct 22, 2006 10:01 am

vector continuous play - what to expect

Post by agidon20 »

Hi All,

When running the following code:

Code: Select all

load_file("nrngui.hoc")
a = 0
objref vplay,tplay
vplay = new Vector()
tplay = new Vector()
vplay.append(0,0,1,1,0)
tplay.append(0,100,100,200,200)
vplay.play(&a,tplay,1)
tstop = 300
run()
What should be the value of variable "a" at the end of the simulation?
in "NEURON -- VERSION 6.0.795 (1556) 2006-09-21", a = 0 but in "NEURON -- Release 7.0 (281:80827e3cd201) 2009-01-16", a = 0.5
Is it a problem to assign discontinuous values in time as above?

Thanks,
Albert.
hines
Site Admin
Posts: 1711
Joined: Wed May 18, 2005 3:32 pm

Re: vector continuous play - what to expect

Post by hines »

That is an inadvertent consequence of the last two points having the same time value. Just add one more point at some epsilon time greater to define how
the interpolation and extrapolation. Ie a nonzero difference in last two time points is required.
Post Reply