[Eeglablist] Multiple .edf datasets to EEGLAB for analysis

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Tue Jan 15 19:16:55 PST 2019


Dear Mohith,

> My datasets are named as 304_sleep data.edf; 305_sleep data.edf...

But in your code, you are generating 'subj1.edf' 'subj2.edf'...

See this Wiki page, particularly this part:

cd('/data/project/example')
rawDataFiles = dir('*.bdf');
for subjID = 1:length(rawData)
    loadName = rawDataFiles(subjID).name;
    dataName = loadName(1:end-4);

    % Step2: Import data.
    EEG = pop_biosig(loadName);
    EEG.setname = dataName;

https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#Example_of_batch_code_to_preprocess_multiple_subjects_.2806.2F27.2F2017_updated.29

Makoto

On Mon, Jan 14, 2019 at 5:39 PM VARMA, MOHITH MUKUND <
mohith96 at connect.hku.hk> wrote:

> Dear all,
>
> I am trying to process multiple datasets of .EDF format on EEGLAB and I
> was wondering could someone help me correcting the script I have compiled
> so far using the tips provided here
> https://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts. The
> current error that I get is:
> Error using edfread (line 125)
> No such file or directory
> Error in StepOne (line 9)
> EEG = edfread(setname,'/Users/mohithverma/Desktop/PSG_Data'); %
>                 Load the dataset
> My datasets are named as 304_sleep data.edf; 305_sleep data.edf...
> Your help is much appreciated! Here's the code that I have come up with so
> far:
>
> eeglab
>
> clear;
>
> Ns = 4;
>
> for S = 1:Ns  % For each of the subjects
>
>     mean_powbase = []; % Initialize the baseline spectra average over all
> conditions for each subject
>
>     setname = ['subj' int2str(S) '.edf'];  % Build dataset name
>
>         EEG = edfread(setname,'/Users/mohithverma/Desktop/PSG_Data'); %
> Load the dataset
>
>         [ALLEEG EEG] = eeg_store(ALLEEG, EEG);  % Store the dataset in
> ALLEEG
>
>         [ersp,itc,powbase{s}] =pop_timef( ALLEEG(s),0, 1, [-100 600], 0,
> 'plotitc', 'off', 'plotersp', 'off' );
>
>
>
> Regards,
>
> --
> Mohith M. Varma (Mo)
> Graduate Research Assistant
>
> Social & Cognitive Neuroscience Laboratory
> Department of Psychology
> Faculty of Social Sciences
> The University of Hong Kong
> Tel: (+852) 52622875
> Email: mohith96 at connect.hku.hk
> _______________________________________________
> 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



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20190115/52e11ca7/attachment.html>


More information about the eeglablist mailing list