csv data extract using extractBetween, importdata
1 次查看(过去 30 天)
显示 更早的评论
There are many .csv files in the folder, below way trying to bring array form but its not working well as expected.
directory_name = uigetdir; % select the data folder location
%%
folders={directory_name};
id_dir =1;
% for id_dir=1:length(folders)
files=dir(folders{id_dir}); % extracted
for id_file=3:length(files)
files(id_file).parameter(:)=extractBetween(files(id_file).name,'data_Results_','.csv');
file_path=[folders{id_dir},'/',files(id_file).name];
content=importdata(file_path,'\t');
And files (56×1 struct with 7 fields), the name column has all rows of .csv data file names like as ' data_Results_Ir_1.csv', Here, I want to get those data file name only without .csv in cell form(data_Results_Ir_1).
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!