Page 1 of 1

record data

Posted: Wed Aug 24, 2005 12:59 pm
by reza_rzm
Dear Frinds,


Fron Neuron toturial i have sthc1.hoc (that create 4 (soma +2 dendrite) ).

to save some data i follow methods and codes in part E of toturial;so in the end of sthc1.hoc , i add

objref rect, recv
rect = new Vector()
recv = new Vector()
recv.record(&SThcells[0].soma.v(0.5))
rect.record(&t)
recv.printf()



when i run program i expect to see value of recv in screen but i see just

0


i think, it means my vector (recv ) is empty!!!! what's wrong???
Could you please help me to find my mistake?!

Have Nice Day

Re: Record Data

Posted: Thu Aug 25, 2005 3:55 am
by Raj
I think you are printing the vector before you do the run and then it is empty.
Try entering the last line after running the simulation or if you work from a file add a run() statement before your last line.

In contrast to the vec.record(&var) statement which marks the vector as an object in which to store information during a run, the printf statement is executed immediately.