If you want to do this a little overboard:
alldata = arrayfun(... @(dirEntry)importdata(dirEntry.name, ' ', 9), ... dir('int_*.ASC'),... 'uniformoutput',false);
This line executes the following
- Gets a list of all files matching a partial file name as an array of structures (h / t Shai)
- For each element in this array, an
importdata call is importdata from your original message. - Compiles all outputs to an array of cells.
source share