Q:

How to import files whose size is greater than some value?

I have some data stored in .csv files with different file size. I need to import files with size greater than some particular value say 10MB. How can I do that? I am using xlsread to import the files.

A:

You can use dir to get file information in the directory where files are located
threshold = 1000; % set threshold for size

filenames = dir('*.csv');
for i = 1:length(filenames)
  if filenames(i).bytes> threshold
    data=xlsread(filenames(i).name);
    ***your code here
  end
end

