FirstNAfter

Creates the new event containing the first N timestamps of one variable after each of the timestamps of the second variable.

Syntax

FirstNAfter(var1, var2, count)

Parameters

Parameter

Type

Description

var1

variableReference

Reference to the variable.

var2

variableReference

Reference to the variable.

count

number

How many timestamps of var1 (that are after each timestamp of var2) to copy to the result

Return

The reference to the new variable.

Examples

Python

import nex
doc = nex.GetActiveDocument()
doc["first5SpikesAfterStimulus"] = nex.FirstNAfter(doc["Neuron06b"], doc["Stimulus"], 5)

NexScript

doc = GetActiveDocument()
doc["first5SpikesAfterStimulus"] = FirstNAfter(doc["Neuron06b"], doc["Stimulus"], 5)