How to read trc files from different directory in matlab -
i have program reads data .trc files. of now, can read .trc files in current directory i.e matlab folder. if want read file, have copy file in matlab folder. there way can move different directories , choose .trc file? have tried using dir, uigetdir etc. nothing seems work!
it's pretty straightforward filter results dir command file extension if specify folder search wildcard character in place of file name. can loop on generated list of file names in output structure (as shown) or whatever need files.
foldername = 'c:\path\to\target\folder\'; filelist = dir(strcat(foldername, '*.trc')); k = 1:length(filelist) filehere = fullfile(foldername, filelist(k).name); % need files in here end
Comments
Post a Comment