Clear Filters
Clear Filters

csv data extract using extractBetween, importdata

1 view (last 30 days)
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).

Answers (0)

Categories

Find more on Cell Arrays in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!