Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

xlsread function does not concatenate all files into one big matrix as expected

1 visualización (últimos 30 días)
Hello,
I am working with a few .xlsx files which I want to concatenate into one, big matrix. Attached you find examples of 4 files and below you have the piece of code I am currently playing with:
folder='D:\Documents\...'; % my folder
filetype='*_pilot_trivia.xlsx';
f=fullfile(folder,filetype);
d=dir(f);
all_participants = [];
for k=1:size(d,1); % using 'numel' instead of 'size' doesn't help
all_participants = xlsread(fullfile(folder,d(k).name));
end
Basically what happens is that everything goes smoothly except the fact that only one specific file out of the entire list gets loaded (i.e. only 9_pilot_trivia.xlsx appears in all_participants in the end) and I don't know why. Could you please be so kind as to help?

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by