LastInInterval

Creates the new event. For each interval of the specified interval variable, the last timestamp in this interval is copied to the result.

Syntax

LastInInterval(var, intervalVar)

Parameters

Parameter

Type

Description

var

variableReference

Reference to the variable.

intervalVar

variableReference

Reference to the interval variable

Return

Reference to the new variable.

Note

Creates the new event. For each interval of intervalVar, the last var timestamp in this interval is copied to the result.

Examples

Python

import nex
doc = nex.GetActiveDocument()
doc["LastSpikeInTrial"] = nex.LastInInterval(doc["Neuron04a"], doc["CorrectTrials"])

NexScript

doc = GetActiveDocument()
doc["LastSpikeInTrial"] = LastInInterval(doc["Neuron04a"], doc["CorrectTrials"])