How do I import a number of excel files at once as seperate variables?
1 次查看(过去 30 天)
显示 更早的评论
I have managed to write a loop which imports all the files into matlab however, it has imported them all into one matrix and to open an excel file I go into the matrix and have to double click the cell to open another matrix with all my data within it. The code is shown below:
numfiles = 54; % number of excel files mydata=cell(numfiles,1); % defining size of mydata
for k = 7:numfiles % loop to import mutliple excel files
myfilename = sprintf('Trial %d', k); % define file name
mydata{k} = xlsread(myfilename); % import files into mydata
end
What I require is a loop which imports the excel files in one go into individual matices so that I can process the data.
It would be great if you can help.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!