Page 1 of 1

vector continuous play - what to expect

Posted: Sun May 24, 2009 6:20 am
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.

Re: vector continuous play - what to expect

Posted: Mon May 25, 2009 5:32 pm
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.