フィルターのクリア

How do I add these files to my loop?

1 回表示 (過去 30 日間)
Fatemah Ebrahim
Fatemah Ebrahim 2020 年 6 月 18 日
回答済み: Image Analyst 2020 年 6 月 18 日
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

回答 (1 件)

Image Analyst
Image Analyst 2020 年 6 月 18 日
Try this:
filePattern = fullfile(myDir, '*.xls*');
myFiles = dir(filePattern);

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by