GetIntervalVarFromMatlab

Imports the specified matrix containing intervals from Matlab.

Syntax

GetIntervalVarFromMatlab(doc, MatrixName)

Parameters

Parameter

Type

Description

doc

documentReference

Reference to the document.

MatrixName

string

The name of the 2-column matrix in Matlab workspace

Return

None.

Note

Imports the specified 2-column matrix from Matlab. The first column of the matrix should contain interval start times in seconds, the second column - interval end times in seconds.

Examples

Python

import nex
doc = nex.GetActiveDocument()
# for testing purposes, we create trials matrix using ExecuteMatlabCommand
# add intervals [1,10], [11,22] and [35,40] (seconds)
nex.ExecuteMatlabCommand('trials = [1 10; 11 22; 35 40]')
nex.GetIntervalVarFromMatlab(doc, "trials")

NexScript

doc = GetActiveDocument()
% for testing purposes, we create trials matrix using ExecuteMatlabCommand
ExecuteMatlabCommand("trials = [1 10; 11 22; 35 40]")
GetIntervalVarFromMatlab(doc, "trials")