GetContVarWithTimestampsFromMatlab

Imports the specified 2-column matrix containing continuous variable data from Matlab.

Syntax

GetContVarWithTimestampsFromMatlab(doc, MatrixName, UseFirstDeltaAsDigRate)

Parameters

Parameter

Type

Description

doc

documentReference

Reference to the document

MatrixName

string

The name of the Matrix in Matlab workspace. The first column of the matrix should contain the values of a continuous variable, the second column - the corresponding timestamps.

UseFirstDeltaAsDigRate

number

Valid values are 0 or 1. If this parameter is positive, the difference between the second and the first timestamp is used as the variable digitizing rate.

Return

None.

Note

This function adds a continuous variable to the specified document. The name of the new variable is the MatrixName.

Examples

Python

import nex
doc = nex.GetActiveDocument()
# for testing purposes, we create contData matrix using ExecuteMatlabCommand
nex.ExecuteMatlabCommand('contData = [1 2; 11 12]')
nex.GetContVarWithTimestampsFromMatlab(doc, "contData", 1)

NexScript

doc = GetActiveDocument()
% for testing purposes, we create contData matrix using ExecuteMatlabCommand
ExecuteMatlabCommand("contData = [1 2; 11 12]")
GetContVarWithTimestampsFromMatlab(doc, "contData", 1)