最近一直在用matlab,順手紀錄一下,方便未來查閱
批次讀取檔案路徑,好用的函數dir
讀寫excel的函數xlsread、xlswrite
範例
path = 'YourFolderPath';
% return all of files of the folder
Files = dir(strcat(path,'*.xlsx'));
LengthFiles = length(Files);
for i = 1:LengthFiles
%批次讀取檔案
[number, text, rawData] = xlsread(strcat(path,Files(i).name));
end
參考資料:
沒有留言:
張貼留言