필터 지우기
필터 지우기

csv data extract using extractBetween, importdata

조회 수: 1 (최근 30일)
Venkat Ta
Venkat Ta 2019년 7월 5일
편집: Venkat Ta 2019년 7월 5일
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개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by