GetBinCount
Calculates the number of timestamps in the specified time range.
Syntax
GetBinCount(var, timeMin, timeMax)
Parameters
Parameter |
Type |
Description |
---|---|---|
var |
variableReference |
Reference to a variable. Should be a reference to a neuron, event, interval or continuous variable |
timeMin |
number |
Time range minimum (in seconds). |
timeMax |
number |
Time range maximum (in seconds). |
Return
The number of timestamps of the specified variable in the specified time range.
Examples
Python
import nex
doc = nex.GetActiveDocument()
neuron = doc["Neuron04a"]
# calculate how many timestamps of Neuron04a are in the interval [5.3s, 10.2s]
count = nex.GetBinCount(neuron, 5.3, 10.2)
NexScript
doc = GetActiveDocument()
neuron = doc["Neuron04a"]
% calculate how many timestamps of Neuron04a are in the interval [5.3s, 10.2s]
count = GetBinCount(neuron, 5.3, 10.2)