Loading EEG files in a loop

9 ビュー (過去 30 日間)
Ella Kle
Ella Kle 2020 年 12 月 12 日
回答済み: Ella Kle 2020 年 12 月 17 日
Hi, I need to load EEG files in a .set format (amond other files in a folder). They should have specific names by subject numbers (here I've only included a couple for an example). I've made the following loop, it works by loading every file, but only the last file stays since it overwrites the previous ones. I would really appreciate your help.
pathforsetfiles = fullfile(direc,'YYY')
list ={'04','05'}
for counter = 1 : length(list)
inp = list{counter}
subj = strcat(['XXX' inp '.set'])
EEG = pop_loadset(subj, pathforsetfiles)
end

採用された回答

Sindar
Sindar 2020 年 12 月 15 日
pathforsetfiles = fullfile(direc,'YYY')
list ={'04','05'}
for counter = 1 : length(list)
inp{counter} = list{counter}
subj{counter} = strcat(['XXX' inp '.set'])
EEG{counter} = pop_loadset(subj, pathforsetfiles)
end
(for more info, search existing answers)

その他の回答 (1 件)

Ella Kle
Ella Kle 2020 年 12 月 17 日
A huge thank you Sindar!!!

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by