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?

回答(1 个)

Stephen23
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

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by