I have multiple csv files that need to be imported to later extract certain columns to write new files. However the code below doesnt return the column I need (column 1) I need the code to create a matrix "Time" for every file

1 次查看(过去 30 天)
folder= 'H:\Matlab\CSV\Processed_csv_Type3';
d = dir([folder '\*.csv']);
for i=1:length(d)
m{i}=csvread(d(i).name); % put into cell array
Time{i} =m{i(:,1)};
end

采纳的回答

KSSV
KSSV 2016-12-2
folder= 'H:\Matlab\CSV\Processed_csv_Type3';
d = dir([folder '\*.csv']);
for i=1:length(d)
m{i}=csvread(d(i).name); % put into cell array
Time{i} =m{i}(:,1);
end

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by