How to load multiple file type XDF ?

Illustration
Erwan Tri Efendi - 2023-04-10T11:27:11+00:00
Question: How to load multiple file type XDF ?

Hello, I have problem load multiple .xdf ? I use code data = pop_loadxdf () but just one file. Please help me, Can I use pop_loadxdf() with multiple file ?

Expert Answer

Profile picture of John Williams John Williams answered . 2025-11-20

Do not change directory just to read a data file. Instead use an absolute/relative filename:

cd ('E:\UNDIP MAGISTER ELEKTRO\Thesis UNDIP\Program Thesis');
currentFolder = pwd;
EEG = dir('*.xdf');
N = length(EEG) ; 
for i= 1:N
    x= EEG(i).name;
    fullFileName = fullfile(cd, x);
    raw(i) = load_xdf(fullFileName);
       
end

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!