You can use a combination of dir function to get a list of files in a directory, and a for loop to read each CSV file using the readtable function. Here's an example code snippet:
main.m334 chars12 lines
This code creates a data cell array where each element corresponds to a CSV file in the directory. You can access each table using curly braces {} and the index of the table in the cell array. For example, data{1} will give you the first CSV file's data.
gistlibby LogSnag