I know that this topic has already been addressed in the forum but despite many trials I couldn’t make it to work properly. So I have to "abdicate".
I wrote the code thereafter. I got the correct number of spikes but I did not understant how to extract the timing from the netcon vector and to transform them in ISI.
Code: Select all
// frequence meter
objref rec, nil , inter_spike, time, spike_indx
spike_indx = new Vector()
inter_spike = new Vector()
time = new Vector ()
soma rec = new NetCon(&v(0.5), nil) // create a netcon that watch the soma to reach a threshold
rec.threshold = -20 // record indexes when V crosses threshold
rec.record(spike_indx)
time.record(&t)
proc freqmeter () {
nbspike = spike_indx.size()
print "nb of spikes ", nbspike
inter_spike=spike_indx.c
inter_spike.deriv
print inter_spike
}
nb of spikes 8 //correct
Vector[12] // ?
Thanks a lot