CreateWaveformVariable

Creates a new waveform variable with specified values.

Syntax

doc.CreateWaveformVariable(name, waveformSamplingRate, timestamps, waveformValues)

Parameters

Parameter

Type

Description

name

string

The name of the variable

waveformSamplingRate

number

Waveform sampling rate in Hz (sampling rate of the continuous channel that was used to extract waveforms)

timestamps

list

List of timestamps in seconds

waveformValues

list of lists

List of waveform values in milliVolts. Each sub-list represents a single waveform (values should be in milliVolts). See sample code below.

Return

None.

Note

Python only.

Examples

Python

import nex
doc = nex.GetActiveDocument()
# create waveform variable with 2 waveforms:
# waveform 1: timestamp = 10s; waveform values are 2, 3, 4 and 1 (mV)
# waveform 2: timestamp = 20s; waveform values are 5, 6, 7 and 2 (mV)
doc.CreateWaveformVariable('ScriptGenerated', 40000, [10,20], [ [2,3,4,1], [5,6,7,2] ] )