[Eeglablist] re-epoching; losing a trial

Yvonne Blokland y.blokland at qmul.ac.uk
Wed May 24 04:47:08 PDT 2017

Hi all,

I am not sure if this is a bug or a stupid error on my end:

I have 25-s epochs, of which I want to use the first 2000ms as baseline, and then ignore the first 5 seconds for analysis.

As far as I understand this cannot be done in one line of code, so I've done it like this:

labels = { 'AAAA'  'AAAB'  'AAAC'}

EEG_all = pop_epoch(EEG, labels, [0  25], 'newname', 'all epochs', 'epochinfo', 'yes');

EEG_all = pop_rmbase(EEG_all, [0 2000]);

EEG_all = pop_epoch(EEG_all, labels, [7 25]);

Weirdly, when doing this I loose the first trial out of every data set at the last step (So: 80 epochs after removing the baseline, 79 epochs left after re-epoching. It's a different trial every time since randomized).

Some output:


ans =

1x79 struct array with fields:



ans =

1x80 struct array with fields:


EEG.epoch.event gives a list of n=1:79 plus an empty one:

ans =

   Empty matrix: 1-by-0

I verified that the same thing happens using the GUI rather than script.

Does anyone have an idea of what could be going on, and/or is there a better way of getting the epochs I want without epoching twice?

Many thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170524/c4f8a271/attachment.html>

More information about the eeglablist mailing list