フィルターのクリア

Finding filename with only part of the name

13 ビュー (過去 30 日間)
NoNo
NoNo 2015 年 9 月 24 日
編集済み: Stephen23 2015 年 9 月 24 日
Hello,
I want to import files that have the same end. How can I do it ? For example:
for i=1:10
Filenames(i) = importFile('*_modif.csv');
end
where all the end of file are composed of '_modif.csv'. I use the * but it didn't work. Could you help me please ? Thank you very much
NoNo

回答 (1 件)

Stephen23
Stephen23 2015 年 9 月 24 日
編集済み: Stephen23 2015 年 9 月 24 日
You can use dir to search for files/folders, and it supports wildcard searches:
S = dir('*_modif.csv');
N = {S.name};
for k = 1:numel(N);
N{k}
end
For a detailed explanation of how this can be used:

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by