I have a vector of voltage clamp values being written to a matrix M, for varying a particular conductance parameter gkabar_borgka. The vector of these parameter values are also written to M. I then print this matrix M to a dataset, trouble is, the dataset is empty! The matrix contains elements though, as can be seen by the M.x[.][.] command. What medial bug have I got?

Code: Select all

```
// Simulations which record the required injected current to hold the cell at -55mV, for varying values of GKABAR.
load_file("Cell.hoc")
// Ensure we are working on WKY model:
SPNcells[0].soma.zetak_borgka=-5
SPNcells[0].soma.zetam_borgka=4
SPNcells[0].soma.gkabar_borgka=0.005
tstop=500
proc init() {
finitialize(-55)
/*
if (cvode.active()) {
cvode.re_init()
} else {fcurrent()
}
frecord_init()
*/
}
objectvar clamp
clamp=new VClamp(0.5)
clamp.amp[0]=-55
clamp.dur[0]=5000
ngka=3
objectvar clamprec, gkabarrec
clamprec=new Vector(ngka)
gkabarrec=new Vector(ngka)
for i=0, ngka-1 {
gkabar_borgka=0.004-(i*0.00005)
run()
print i
clamprec.x[i]=clamp.i
gkabarrec.x[i]=gkabar_borgka
}
objectvar M
M=new Matrix(ngka,2)
objectvar DataV
DataV=new File()
M.setcol(0,gkabarrec)
M.setcol(1,clamprec)
DataV.wopen("Injected_Current_Amplitudes_29Jan12.dat")
M.fprint(DataV, " %g")
```

Linford