[Eeglablist] Save epoch subsets
Tarik S Bel-Bahar
tarikbelbahar at gmail.com
Mon Apr 9 16:03:16 PDT 2018
Hello Dagfinn,
One solution would be too simply clear eeglab memory (so no sets are
loaded) after saving out your first dataset, and then reload the mother
data set as the one set in memory, and then cut out the next trials you
want, then save out, and repeat until you have all your child datasets.
Review eegh output to make sure you are not missing steps. For example, I
don't see the basic command that "updates" eeglab memory after a dataset is
loaded. See eegh output after loading any normal file.
Thanks for letting the list know of what solution you settle on as your
experiences will help other users on the list.
On Fri, Apr 6, 2018 at 1:07 AM, Dagfinn Matre <Dagfinn.Matre at stami.no>
wrote:
> Dear EEGLAB experts,
>
>
>
> Using a matlab script, I would like to split an epoched file with say 90
> epochs into subset 1 (epoch 1:30), subset 2 (31:60), subset 3 (61:90), and
> save these subsets in separate set-files.
>
>
>
> It works fine for the first subset with this code:
>
>
>
> EEG = pop_loadbva(filliste(n).name);
>
> EEG = eeg_checkset( EEG );
>
> EEG = pop_select( EEG,'trial',[1:30] );
>
> EEG = eeg_checkset( EEG );
>
> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 1,'setname','temp','gui'
> ,'off');
>
> EEG = pop_saveset( EEG, 'filename',new_filename,'filepath',savedir);
>
>
>
> The problem appears when I want to re-select the mother dataset containing
> all epochs in order to select the next subset. Using the GUI and saving the
> eeglabhist.m indicates that this is the next line of code,
>
>
>
> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 2,'retrieve',1,'study'
> ,0);
>
>
>
> but when I continue with this line, selecting the next trials, matlab
> returns “Error: dataset is empty”.
>
>
>
> EEG = pop_select( EEG,'trial',[31:60] );
>
>
>
> Any ideas anyone?
>
>
>
> Best,
>
> Dagfinn Matre
>
>
>
>
>
> _______________________________________________
> 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/20180409/e542284e/attachment.html>
More information about the eeglablist
mailing list