EEG script: problem in uploading multiple files into EEGLAB using a "for" loop pre-made script
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm supposed to adapt a pre-made script (devised to upload multiple EEG datasets and perform filtering and resampling in one step) to the dataset files I have in my PC. I'm new to MATLAB so sorry for very naive mistakes. When I run this code (this is a reduced version of it, for simplicity)
for x = 1:17
filepath = ['/Users/mimmo/Desktop/cartella senza titolo 2/sample data EEG/' num2str(x) '17_GCBS_H3-01_PASAT.eeg']
fname = ['17_GCBS_H3-01_PASAT' int2str(x) '_PASAT']
EEG = pop_fileio(filepath);
EEG = pop_editset(EEG, 'setname', fname);
EEG = pop_select( EEG,'nochannel',{'ECG'});
end
I'm supposed to access the folder referred to the path I specified and execute the three "pop" operations along the 17 files contained in the folder. Unfortunately, the way I devised this doesn't work at all.
I am supposed to modify it by keeping the commands the same, just by changing the inputs. The files contained in the folder I should loop for are all named "17_GCBS_H3-**_PASAT.eeg", where ** is the only changing part and it refers to the dataset number, ranging from 01 to 17.
I tried different ways but all I can do is to loop 17 times on the "01" dataset (I also removed the "num2str" command which is something I'm normally not allowed to do).
0 Commenti
Risposte (1)
Mohammad Dar
il 2 Ott 2019
have you tried this:
[ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG);
0 Commenti
Vedere anche
Categorie
Scopri di più su EEG/MEG/ECoG in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!