How do I add these files to my loop?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have multiple files and I only want my Excel files added to the directory.
myDir = uigetdir('path'); %gets directory
myFiles = dir(fullfile(myDir));
M(length(myFiles),s)=zeros; %gets all wav files in struct
for k = 1:length(myFiles)
baseFileName = myFiles(k).name;
fullFileName = fullfile(myDir, baseFileName);
A = readmatrix(fullFileName,'Whitespace',' []');
end
0 Kommentare
Antworten (1)
Image Analyst
am 18 Jun. 2020
Try this:
filePattern = fullfile(myDir, '*.xls*');
myFiles = dir(filePattern);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!