I'm fairly new at MATLAB, so forgive if I'm saying stuff that is completely wrong. I am trying to write a little program that reads in the files from a certain directory with extension .xlsx and then assigns the columns to vectors. When I manually give up the file names, my program looks like this:
files = {'130926','130927'}
file_number = 1;
file_amount = length(files);
while file_number <= file_amount
file_name = files(file_number);
cd('C:\place_where_I_store_my_files');
A = xlsread(char(strcat(file_name)));
J = A(:,1);
J_sp = A(:,2);
file_number = file_number + 1
end
I've tried a lot of different things to read in the files automatically among wich:
files = {'*.xlsx'}
But it all yields errors. Thanks for reading.
Matthias