[Eeglablist] Unable to concatenate four epoched datasets with pop_mergeset

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Fri May 19 11:32:15 PDT 2017


​​
Hi Joseph, some notes below that should solve this. Best wishes.

*************************************************************************************

after you do it all in the GUI ONLY, type eegh to get the full history of
all commands that were run by eeglab, review that very closely and then
emulate that.
I think your problem is that you're not properly updating everything via a
command such as
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET);

Further, if your command were working, you should be able to eeglab redraw,
and
then you should be able to see 4 loaded datasets in the GUI > Datasets list
If you don't see them, they were not properly loaded.


Please review eegh closely after running things in GUI until you build up
expertise on what eeglab "expects and needs" to work well.
If you haven't had a chance to, also review online materials about
scripting in eeglab.





On Fri, May 19, 2017 at 1:03 PM, Joseph Nuamah <jknuamah at aggies.ncat.edu>
wrote:

> 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.
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.
> ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170519/c60bfca3/attachment.html>


More information about the eeglablist mailing list