MATLAB: How to use an array of files

matrix arraystringsxlsread

I have this code below which I am trying to make an array of files to use in a loop so I don't have to rewrite the same code over and over again, but when I use this method the array only pulls the first letter of the file name making it impossible to access that file. The fname array is the one I am trying to specify, but when I make it a string array it does not recognize the names as a file. Thanks in advance.
L = 50.8; %Support Span as measured in mm.
b = 24.75; %Width of rock as measured in mm.
d = 10.2; %Thickness of rock as measured in mm.
fname = ['Specimen_RawData_1.xls','Specimen_RawData_2.xls',...
'Specimen_RawData_3.xls','Specimen_RawData_4.xls',...
'Specimen_RawData_5.xls','Specimen_RawData_6.xls',...
'Specimen_RawData_7.xls','Specimen_RawData_8.xls',...
'Specimen_RawData_9.xls','Specimen_RawData_10.xls',...
'Specimen_RawData_11.xls','Specimen_RawData_12.xls',...
'Specimen_RawData_13.xls','Specimen_RawData_14.xls',...
'Specimen_RawData_15.xls','Specimen_RawData_16.xls',...
'Specimen_RawData_17.xls','Specimen_RawData_18.xls',...
'Specimen_RawData_19.xls','Specimen_RawData_20.xls',...
'Specimen_RawData_21.xls','Specimen_RawData_22.xls',...
'Specimen_RawData_23.xls','Specimen_RawData_24.xls',...
'Specimen_RawData_25.xls'];
for i = 1:25
a = xlsread(fname(i));
x = a(:,3);
y = a(:,4);
[ra,ca,va] = find(y > i);
ta = ra(1);
[rb,cb,vb] = find(y > i - 10);
tb = rb(1);
m = ((y(ta)-y(tb))/(x(ta)-x(tb)))/1e3
E = ((L^3)*m)/(4*b*d^3)
n = i;
plot(n,E,'*')
end

Best Answer

Implement these changes:
% Fname as a cell array of strings
fname = {'Specimen_RawData_1.xls',...
...}
% note the curly brackets
a = xlsread(fname{i});