[Eeglablist] Loading both .set and .fdt files in command line

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu Mar 17 13:14:04 PDT 2022


Dear Patrick,

In addition to Velu's input, here is a link to EEGLAB/Matlab coding tricks
that may help generally.
https://sccn.ucsd.edu/wiki/Makoto%27s_useful_EEGLAB_code

Makoto

On Thu, Mar 17, 2022 at 10:52 AM Patrick Bloniasz <pblonias at bowdoin.edu>
wrote:

> Hi all,
>
> I am trying to pull some information from many files in a for loop in
> MATLAB without using the EEGLAB GUI. When I load a file in the GUI by
> clicking "load existing data set" and picking a .set file, both the .fdt
> and .set file load properly. However, if I use something like:
>
> filePattern = fullfile(curexperiment.dirroot, '*.set' );
> theFiles = dir(curexperiment.dirroot);
> for k = 1 : length(theFiles)
>     baseFileName = theFiles(k).name;
>     fullFileName = fullfile(theFiles(k).folder, baseFileName);
>     fprintf(1, 'Now reading %s\n', fullFileName);
>     EEG = pop_loadset(fullFileName); %STEP 1
>     EEG =
> pop_loadset('filename',baseFileNames,'filepath',curexperiment.dirroot);
>     [....]
> end
>
> It does not work, because I can only get the .set file to load. The object
> structure I need is in the .fdt file. However, if I change that first line
> to something like:
>
> filePattern = fullfile(curexperiment.dirroot, '*.(set|fdt)' ); (i.e.,
> either a set or an fdt)
>
> It doesn't load either file (but does not turn an error).
>
> I took the step to do the "save script file" after loading it from the GUI
> to see if I am doing something wrong, but it similarly just uses the simple
> .set input and somehow also grabs the .fdt in a way I can't see that isn't
> working in my for loop.
>
> Does someone have any thoughts on how to load both the .set and .fdt file
> simultaneously without having to use the GUI for all files in a given
> directory?
>
> Patrick
> _______________________________________________
> 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
>



More information about the eeglablist mailing list