Markerextract function – Multichannel Systems NeuroExplorer User Manual

Page 256

Advertising
background image

5.5.8.26. MarkerExtract Function

MarkerExtract Function


Creates a new event variable based on existing marker variable.

Syntax


variableReference MarkerExtract(doc, MarkerVariableName, ExtractString)

Parameters

Parameter

Type

Description

doc

documentReference Reference to the document

MarkerVariableName

string

The name of the marker variable.

ExtractString

string

Extract string. See comments.

Returns


None

Comments


ExtractString contains a list of items separated by commas. Items AND or OR should be placed
between the conditions for the sample field. Conditions for each marker field should end with the item
EOF. The last item in ExtractString list should be END.


For example, assume that we have a marker variable Strobed with one field that contains integer
values. To extract all the timestamps with the field value 3 you may use the following command:

doc.NewEvent = MarkerExtract(doc, "Strobed", "=3,EOF,END")


To extract all the timestamps with the field values 3, 4 and 5 you may use the command:

doc.NewEvent = MarkerExtract(doc, "Strobed", ">2,AND,<6,EOF,END")


To use string comparisons in timestamp extraction, add $ sign at the beginning of the string. For
example, to extract timestamps with Ev_Marker field value WL, use:

doc.NewEvent1 = MarkerExtract(doc, "Ev_Marker", "=$WL,EOF,END")


Usage

NexScript

doc = GetActiveDocument()

doc.NewEvent = MarkerExtract(doc, "Strobed", "=3,EOF,END")

See Also

Introduction to NexScript Programming

NexScript Function Categories

Page 254

Advertising