I am currently trying to read in a couple of xlsx-files (basically lists, that consist of one column of 1 to 4 numeric values) into a mat-file.
My problem is that the code below only saves one xlsx-file - named 'I' - into the mat-file.
I want to save every xlsx-file within the folder into the mat-file under their original names (=baseFileName).
Is there any way to do this?
myDir = uigetdir('*.*', 'Please select Input Folder');
myFiles = dir(fullfile(myDir,'*.xlsx'));
for k = 1:length(myFiles)
baseFileName = myFiles(k).name;
fullFileName = fullfile(myDir, baseFileName);
I = xlsread(fullFileName);