How do I access a specific directory so I can then retrieve images in that directory with a specific file extension?
1 回表示 (過去 30 日間)
古いコメントを表示
How do I access a specific directory so I can then retrieve images in that directory with a specific file extension?
0 件のコメント
回答 (1 件)
Stephen23
2019 年 9 月 9 日
編集済み: Stephen23
2019 年 9 月 9 日
D = 'relative or absolute path to the specific directory';
S = dir(fullfile(D,'*.png'));
C = {S.name} % output cell array
1 件のコメント
Walter Roberson
2019 年 9 月 10 日
C = fullfile(D, {S.name}); % output cell array
to get the fully-qualified names.
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!