Returns directory listing of all files in diretory specified by fpath of one of the types specified in cell-array ftypes
0001 function flist = listFilesOfType(fpath,ftypes) 0002 % Returns directory listing of all files in diretory specified by fpath of 0003 % one of the types specified in cell-array ftypes 0004 0005 % 27Oct2011 PJ 0006 0007 ntypes = length(ftypes); 0008 0009 flist = {}; 0010 for itype = 1:ntypes 0011 tmplist = dir(fullfile(fpath,sprintf('*.%s',ftypes{itype}))); 0012 0013 flist = [flist {tmplist(:).name}]; 0014 0015 end % for itype 0016 0017 return