Using Matlab scripting box to store the signal in a vector

Making & changing box plugins and external apps
Post Reply
gibfen
Posts: 5
Joined: Wed Oct 24, 2012 8:30 am

Using Matlab scripting box to store the signal in a vector

Post by gibfen »

Hello,

I am starting to use OpenViBE with the Matlab script utility box. I am working with recorded data as "generic stream", so the data is ok.

The simplest scenario, is to use first the "Generic stream reader" box and second a "Channel selector" box, just to take one of the several EEG signals (to make this easier). Then, I would like to add a "Matlab Scripting box", just to store the values of the selected signal in a vector (or a matrix if I choose more than one channel). It sounds so trivial, but let me continue the explanation :P

I know that in the "***_Process.m" you can get the real values from a buffer. But I am not interested now in compute in real-time what I get from the buffer (I do so in other scenario), the only thing that I want to do is to store all the data from buffers step by step in a vector so I can read it "offline" with Matlab.

The idea is to analize the output signal of a computation that I am doing in real-time with other scenario using the Matlab scripting box, so I can know better whether the output in OpenViBE is as "correct" as the same output but working only with Matlab "offline".

Maybe one idea is to use the "Time based epoching" with a duration that matches with the duration of the recorded signal, and the in the "process.m" I use a sentence like "save channel channel". So only once the function is called, and the buffer should have all the samples of the record. This is just something that comes to my mind while I am writing this. So, if this works I will tell you :)

Best!

gibfen
Posts: 5
Joined: Wed Oct 24, 2012 8:30 am

Re: Using Matlab scripting box to store the signal in a vect

Post by gibfen »

Ok. It' works :)

Post Reply