Hi I have 25000 file txt and I wrote the below code to read all the txt extract all the value and than I will use for some calculation.
The problem is that at the moment I have valC that is composed by 25000cell and each cell is composed by <14×1>cell. I would like to remove one level or extract the 14value of each cell for 25000times in a single 25000x14cell. Is it possible?
fileList = dir('*.txt');nameFile = cell(1, numel(fileList)); % Pre-allocate!
for i = 1:numel(fileList) NAME = fileList(i).name; % [EDITED]
nameFile{i} = NAME; fid = fopen(NAME); valC(i) = textscan(fid, '%s', 'delimiter', ','); val = valC; fclose(fid);end
Best Answer