Hi there,
I have a folder full of .dat files. Many of these .dat files have the word "fluxall" in them, for example "PJG_2019_fluxall.dat". I would like to use the "readtable" function to read all the .dat files with the word "fluxall" in them. So far I have:
files = struct2cell(dir('*fluxall*.dat'));filenames = char(files(1,:));ind = cellstr(1:length(filenames));for i = 1:length(filenames) eval(['Table_',ind{i},' = readtable(',filenames{i},');']);end
The idea is to create a table named "Table_1,2,3…" for each "fluxall".dat file. Obviously it doesnt work.
Thanks!
Best Answer