GetFirstGE

Returns the index of the first timestamp in the specified variable that is greater than or equal to the specified number.

Syntax

GetFirstGE(var, time)

Parameters

Parameter

Type

Description

var

variableReference

Reference to the variable

time

number

Time value in seconds.

Return

Returns the index of the first timestamp in the specified variable that is greater than or equal to the specified number.

Examples

Python

import nex
doc = nex.GetActiveDocument()
neuron = doc["Neuron04a"]
# get the index of the first spike at or after 5.7s
index = nex.GetFirstGE(neuron, 5.7)

NexScript

doc = GetActiveDocument()
neuron = doc["Neuron04a"]
% get the index of the first spike at or after 5.7s
index = GetFirstGE(neuron, 5.7)