MATLAB Answers

How do I access a specific directory so I can then retrieve images in that directory with a specific file extension?

2 views (last 30 days)
James
James on 9 Sep 2019
Commented: Walter Roberson on 10 Sep 2019
How do I access a specific directory so I can then retrieve images in that directory with a specific file extension?

  0 Comments

Sign in to comment.

Answers (1)

Stephen Cobeldick
Stephen Cobeldick on 9 Sep 2019
Edited: Stephen Cobeldick on 9 Sep 2019
D = 'relative or absolute path to the specific directory';
S = dir(fullfile(D,'*.png'));
C = {S.name} % output cell array

Sign in to answer this question.

Products


Release

R2019a