Given i have multiple csv files in a folder, how can i access it and read them?

6 次查看(过去 30 天)
Hi
T1=xlsread('file1.csv');
T2=xlsread('file2.csv');
...
How can i access each file in my folder and process them eventually?

采纳的回答

Lukas Bystricky
Lukas Bystricky 2015-8-4
Try something like this
files = dir('*.csv');
num_files = length(files);
results = cell(length(files), 1);
for i = 1:num_files
results{i} = xlsread(files(i).name);
end
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Search Path 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by