Hello,
i am trying to apply my own filter to the signal obtained from BCI2000 with the MatlabSignalProcessing module. However i am not sure own how does the signal income work.
Lets assume i have defined BlockSize=3 and ChannelNumber=4. This means that there are 4 channels transmiting and that there are 3 samples transmitted each time, if i am correct.
I guess than each sample has information from the 4 channels, so a block would be composed of 4x3 matrix.
I want to access all the information from a block in BCIProcess ( a function that MatlabSignalProccesing module does use to process each block).
So, on how i think information is stored, could be viewed this way:
Block:
Sample1 Sample2 Sample3
Ch1 a a' a''
Ch2 b b' b''
Ch3 c c' c''
Ch4 d d' d''
I am trying this:
for j=1:length(in_signal(1,:)) %For each sample of the block(3)
s = in_signal(:,j); % Read all the info from the sample (should be 4, the number of channels)
And this way i would expect to get (in this order):
a b c d ;
a' b' c' d';
a'' b'' c'' d''
But this is not working, so info must be stored in another way.
Could someone explain it to me?
Another question i have, is that what is the difference between:
in_signal(1,:)
in_signal(2,:)
Seems there are 2 in_signal channels but i am not sure how they work. I have not found any useful documentation on this matter.
Matlabsignalprocessing module, incoming signal readings
-
- Posts: 19
- Joined: 07 Sep 2016, 20:03
Re: Matlabsignalprocessing module, incoming signal readings
Lsegura003,
the in_signal matrix is of size channels x elements, where the number of elements depends on your SampleBlockSize parameter. Which channels are transmitted to your MatlabFilter depends on the TransmitChList parmeter in the Source. For example, you could record channels 1 to 16 but also transfer channels 2, 3 an 5 to the Matlab filter by having the the TransmitChList set to "1 3 5". The synatx in_signal(1,:) takes all the samples (i.e., SampleBlockSize number of samples) of the first channels.
You can find an example of the bci_Process function in the /prog/matlab folder of your BCI2000 installation.
Regards, Peter
the in_signal matrix is of size channels x elements, where the number of elements depends on your SampleBlockSize parameter. Which channels are transmitted to your MatlabFilter depends on the TransmitChList parmeter in the Source. For example, you could record channels 1 to 16 but also transfer channels 2, 3 an 5 to the Matlab filter by having the the TransmitChList set to "1 3 5". The synatx in_signal(1,:) takes all the samples (i.e., SampleBlockSize number of samples) of the first channels.
You can find an example of the bci_Process function in the /prog/matlab folder of your BCI2000 installation.
Regards, Peter
-
- Posts: 19
- Joined: 07 Sep 2016, 20:03
Re: Matlabsignalprocessing module, incoming signal readings
As always, thanks a lot Peter!
I totally missed the transmitted channel field.
I totally missed the transmitted channel field.
Who is online
Users browsing this forum: Google [Bot] and 29 guests