The 'continuous' flag of Vector.play()
Posted: Fri Aug 26, 2011 5:08 am
I have 2 queries related to the 'continuous' flag of Vector's play() function. When we run the following bit of code, we would expect the 'temp' procedure to be called once for every dt.
1) Why is it getting called every dt/2.
2) Why is 'temp' called twice for time values in tVec?
Any explanation would be welcome.
thanks,
John
1) Why is it getting called every dt/2.
2) Why is 'temp' called twice for time values in tVec?
Any explanation would be welcome.
thanks,
John
Code: Select all
load_file("nrngui.hoc")
objref vVec, tVec
create dummy
vVec = new Vector(5)
tVec = new Vector(5)
for i=0,4 {
vVec.x[i] = i
tVec.x[i] = i
}
proc temp () {
printf("%f ", t)
}
vVec.play("temp($1)", tVec, 1)
steps_per_ms = 1
dt = .5
tstop = 5
run()