Question about loading multiple files
Show older comments
Greetings,
I wrote an 'm' function to load several files recursively and do some processing/graphing.
If I declare the file names in a string array, then the code executes with no issue.
However, if I load all files with the dir() function, I get an error message after the 1st file is loaded. What am I missing?
DIR_STR=dir('*.mf4');
FILES= DIR_STR.name
for ii=1:5
FILE=FILES(ii,:)
disp(['ii = ' num2str(ii) ' -- File: ' FILE])
end
Accepted Answer
More Answers (0)
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!