[Eeglablist] Unable to concatenate four epoched datasets with pop_mergeset

Joseph Nuamah jknuamah at aggies.ncat.edu
Fri May 19 10:03:24 PDT 2017


Hello everyone,

I am using pop_mergeset to concatenate four epoched datasets from the same
participant.

I am able to achieve that with the GUI in EEGLAB.

However, I am unable to do that with the Matlab script below. The error I
receive tells me the array of all loaded datasets, ALLEEG, is empty.

Please find the code below:

=====================================================================

dpath = 'D:\\MATLAB\\eeglab\\G1\\';

EEG = pop_loadset('filename','Block1.set','filepath',dpath );
EEG = eeg_checkset( EEG );
%clear('EEG')
EEG = pop_loadset('filename','Block2.set','filepath',dpath );
EEG = eeg_checkset( EEG );
%clear('EEG')
EEG = pop_loadset('filename','Block3.set','filepath',dpath );
EEG = eeg_checkset( EEG );
%clear('EEG')
EEG = pop_loadset('filename','Block4.set','filepath',dpath );
EEG = eeg_checkset( EEG );
%clear('EEG')

EEG = pop_mergeset( ALLEEG, [1  2  3  4], 0);
EEG.setname='P1';
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG,
'filename','P1.set','filepath','D:\\MATLAB\\eeglab\\G1\\P1\\');
EEG = eeg_checkset( EEG );

eeglab redraw;
======================================================================




This is the error message:

======================================================================

Error using pop_mergeset (line 54) needs at least two datasets

Error in LoadFiles (line 18) EEG = pop_mergeset( ALLEEG, [1  2  3  4],0);
======================================================================



Please help !

Thanks.

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


More information about the eeglablist mailing list