Code: Select all
fo = new File()
{ fo.wopen("data/spikes.dat") }
t_curr = 0
while (t_curr <= Tstop){
print "Time = ",t_curr
if(t_curr + t_seg <= Tstop) {
{ pr.pnm.pcontinue(t_curr+t_seg)}
} else {
{pr.pnm.pcontinue(Tstop)}
}
for i=0, pr.pnm.spikevec.size-1 {
fo.printf("%-10.6lf, %d\n", pr.pnm.spikevec.x[i], pr.pnm.idvec.x[i])
}
pr.pnm.spikevec.resize(0)
pr.pnm.idvec.resize(0)
t_curr = t_curr + t_seg
}
{fo.close()}
1) Both pcontinue and psolve seem to work equivalently. Is there a difference that I should be aware of?
2) For some reason, I cannot name the file object anything I want. For example, when I tried to name it 'forast' instead of 'fo,' I received a syntax error. Any idea why this is?
3) This works on my laptop, but do I need to use 'gatherspikes' in order to ensure that this will also work in parallel?