csv data extract using extractBetween, importdata

7 visualizzazioni (ultimi 30 giorni)
Venkat Ta
Venkat Ta il 5 Lug 2019
Modificato: Venkat Ta il 5 Lug 2019
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).

Risposte (0)

Categorie

Scopri di più su Cell Arrays in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by