Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 2.32 KB

readme.md

File metadata and controls

53 lines (37 loc) · 2.32 KB

Guideline for MATLAB to work with EMOTIV LSL Interface

The following guide describes how MATLAB works with EMOTIV LSL Interface.

Prerequisites

    git submodule update --init

How to receive data from EMOTIV LSL Outlet stream in MATLAB

  1. Go to Lab Streaming Layer page, Outlet tab in EmotivPRO, choose the desire Data stream type and Data format. Click the Start button to start streaming.

  2. Open vis_stream.m in MATLAB.

  3. Run vis_stream.m. In the pop-up dialog, change the sampling rate for display to match the rate of data from the Outlet:

  1. Hit Ok. The data stream will be displayed like this:

Note: You also can retrieve data via RecieveData.m example.

How to send marker from MATLAB to EMOTIV LSL Inlet

  1. Open sendmarker.m in MATLAB. The program will create a marker event every second.
  • The marker event is a vector containing MarkerTime, MarkerValue and CurrentTime.
  • The MarkerTime and CurrentTime are epoch time in double format - we need both for the time synchornization between machines.
  • The MarkerTime is time of marker event. The MarkerValue is value of marker. The CurrentTime is current epoch time of processing.
  1. Run sendmarker.m.

  2. Go to Lab Streaming Layer page, Inlet tab on EmotivPRO, choose MatlabMarker in stream name. Then click the Connect button.

  1. Markers will be added to data stream as the vertical red lines:

Reference