Assigning Multiple Files to a Variable Name
3 views (last 30 days)
Show older comments
Hi, I am trying to get a variable to = a list of file names in multiple folders. So, I have assigned...
s = {0012_20131122_130242.705000 0092_20131122_130242.705000
0013_20131122_130242.705000 0093_20131122_130242.705000
0014_20131122_130242.705000 0094_20131122_130242.705000
0015_20131122_130242.705000 0095_20131122_130242.705000
0016_20131122_130242.705000 0096_20131122_130242.705000
0017_20131122_130242.705000 0097_20131122_130242.705000
0018_20131122_130242.705000};
for kk = 1:numel(s);
t = spm_select('List', s, '.*');
........
end
I then want the program to run through the list of files and complete the commands. I cannot get the program to read the files, even when using single quotes.
Please let me know if there is a more efficient way for the program to read the files. Thanks!
0 Comments
Answers (1)
See Also
Categories
Find more on Workspace Variables and MAT Files 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!