Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Bianca Elena Ivanof
Bianca Elena Ivanof le 31 Mai 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
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?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by