SelectTrials

Creates the new event containing the specified timestamps of a variable.

Syntax

SelectTrials(var, selectList)

Parameters

Parameter

Type

Description

var

variableReference

Reference to the variable.

selectList

string

A list of comma-separated indexes or ranges of timestamps. for example: 1,3-5,10

Return

The reference to the new variable.

Examples

Python

import nex
doc = nex.GetActiveDocument()
doc["selectedEvents"] = nex.SelectTrials(doc["Event04"], "1,5-10")

NexScript

doc = GetActiveDocument()
doc["selectedEvents"] = SelectTrials(doc["Event04"], "1,5-10")