Introduction
Markers MUST be stored as a struct array before sending them to AnyWave.
Marker struct description
Marker.label; % label of marker
Marker.position; % position in seconds.
Marker.duration; % duration in seconds.
Marker.value; % value associated with marker
Marker.channels; % cell array of strings. Labels of targeted channels. Empty if the marker is GLOBAL.
Marker.color; % string coding the color in RVB. Must start with #. Example for red : '#FF0000'
Not all fields are required. The only required fields are:
- label
- position
If other fields are not specified, the default values for that fields will be taken into account.
Duration will be 0s, value will be 0., targets will be an empty cell array, and colour an empty string meaning the default color will be black.
Usage
Sending 2 markers to AnyWave.
One is a GLOBAL marker with a duration of 5s and colored in red.
The second is a marker targeting a channel, with no duration.
function main(varargin)
anywave('init', varargin);
markers(1).label = 'first marker';
markers(1).position = 1.;
markers(1).duration = 5;
markers(1).color = '#FF0000';
markers(2).label = 'second marker';
markers(2).position = 6;
markers(2).channels = {'A1'}; % this marker will target channel A1
anywave('send_markers', markers);