how to open multiple .txt files?
7 ビュー (過去 30 日間)
表示 古いコメント
採用された回答
Ive J
2020 年 12 月 20 日
If all the files have the same structure/data format, you can use datastore to merge them:
fileNames = {'t1.txt', 't2.txt', 't3.txt'}
ds = readall(datastore(fileNames)); % change other properties if needed
otherwise, you can use readtable within a loop
fileContents = {};
fileNames = {'t1.txt', 't2.txt'};
for i = 1:numel(fileNames)
fileContents{i, 1} = readtable(fileNames{i});
end
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Find more on Datastore in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!