csv data extract using extractBetween, importdata

7 vues (au cours des 30 derniers jours)
Venkat Ta
Venkat Ta le 5 Juil 2019
Modifié(e) : Venkat Ta le 5 Juil 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).

Réponses (0)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by