I am trying to record the results of simulations run using the GUI to a vector and then write that vector to a text file. When I open the hoc file, a text file with the correct name is created, but, after running simulations with the GUI, the text file still contains no data. Here is the code for the creation of the vector and the creation of the file. These come after the specification of the biophysics of the model:
Code: Select all
// New vector for recording Vsoma
objref vvec, tvec
tvec = new Vector()
tvec.record(&t) // record time
vvec = new Vector()
soma vvec.record(&v(0.5)) // record v at soma
// New file for recording vector
objref f1
f1 = new File()
f1.wopen("grcv.txt")
tvec.printf(f1)
vvec.printf(f1)
f1.close()
I have a custom initialization procedure after this code section that injects a constant current to set the resting membrane potential. What is going on here and how do I fix it?
Thanks in advance.