MATLAB: How to list files in the directory

pwd

How do i list file with certain prefix for instance file that include 'Data' in the directory and of certain type for instance only excel file ('.xlsx')

Best Answer

D = 'absolute/relative path to where the files are saved';
S = dir(fullfile(D,'Data*.xlsx'))
Related Question