Problem with streamed matrix output in Matlab scripting
Posted: Thu Apr 21, 2016 8:38 am
Hi,
I am trying to use my matlab code to classify EEG signals in Openvibe. My matlab script box has one signal input and one matrix output.Unfortunately, I wasn't able to find any resources/examples for streamed matrix output. So I summarize my questions as follows:
- Should I define headers for input/output in initialize.m or in process.m or both?
- How can I define header for streamed matrix output? Currently I am using the below line that causes the program to crash:
box_in = OV_setStreamedMatrixOutputHeader(box_in, 1, 2, [1 2], ['R', 'L']); (for output matrices like [0.6 0.4])
- How can I put matrices in the output? Is it right to use:
box_in = OV_addOutputBuffer(box_in,2,start_time,end_time,matrix);
Any help is appreciated.
I am trying to use my matlab code to classify EEG signals in Openvibe. My matlab script box has one signal input and one matrix output.Unfortunately, I wasn't able to find any resources/examples for streamed matrix output. So I summarize my questions as follows:
- Should I define headers for input/output in initialize.m or in process.m or both?
- How can I define header for streamed matrix output? Currently I am using the below line that causes the program to crash:
box_in = OV_setStreamedMatrixOutputHeader(box_in, 1, 2, [1 2], ['R', 'L']); (for output matrices like [0.6 0.4])
- How can I put matrices in the output? Is it right to use:
box_in = OV_addOutputBuffer(box_in,2,start_time,end_time,matrix);
Any help is appreciated.