How to load multiple file type XDF ?

E
Erwan Tri Efendi · Apr 10, 2023 · 2.1K views
Question
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 PhD Expert
Answered Aug 24, 2026

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

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!