I am new here, so it is my first post. I will describe the scenario of my problem.
I have bought an OpenBCI acquisition system and I am using the OpenVIBE P300 scenario in order to collect some data. Since I am interested in some Matlab off-line analysis with my acquired data, I have used the ov2mat.m function that is provide here http://openvibe.inria.fr/converting-ov-files-to-matlab/
This function save on a file the following variables:
channelsNames: a cell array of size 1x C, where C is the number of electrodes used in the acquisition, containing the name of the channels (the ones that have been load in the SAS)
samples: a N x C matrix containing the recorded EEG data
sampleTime: a N x 1 vector containing the time information
sampleFreq: a number indicating the sample frequency used during acquisition.
stims: a M x 3 matrix containing some time information, code stimulation and, in the last column, all zeros (don't know why)
In order to do some processing with the EEG data, I should have to know the beginning of a target/non-target stimulation, the raw or column that was being highlighted and so on. The second column of the stims matrix contain that information given by the stimulation codes as described here: http://openvibe.inria.fr/stimulation-codes/. Those codes, as well as I understood, are associated to a specific time point given in the first column of stims matrix, with which can then be used to extract EEG epochs. Unfortunately, when I tried to extract a segment of EEG given in the samples matrix, I almost all cases, the time point in which theoretically a stimulus was applied do not "exist" in the sampleTime vector, i.e. I am not able to know the beginning of an epoch/trial. So, my questions are:
Why time information given in stims matrix do not concord with the one given in the sampleTime vector?
Please, any advice will be happily received. !How, can I then extract trial for off-line analysis in Matlab?