Load many files from the same folder using the each letter from the alphabet as a file name

1 view (last 30 days)
Hi I want to load many files from the same folder using the each letter from the alphabet as a file name is it possible?
I'm uipickfiles to choose my files (<http://www.mathworks.com/matlabcentral/fileexchange/10867-uipickfiles-uigetfile-on-steroids)>. Below is my code where NR(ii) is trying to take f.ex. NR(1) = A and say that the files name is A and then load it. I always get a error but is it possible?
q1 = input('Number of objects observed? ');
if q1 <= 18 %18 is the max
q1 = 2*q1;
else
disp(['One fish was automatically choosen.']);
q1 = 2;
end
files = uipickfiles('num',q1,'out','ch');
NR = 'ABCDEFGHIJKLMNOPQRSTUVXZ';
for ii = 1:q1
NR(ii) = load(files(ii,:));
end

Accepted Answer

Walter Roberson
Walter Roberson on 16 Jan 2013

More Answers (0)

Categories

Find more on Dialog Boxes 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!