dirName = '../features/movingwindowFeature/'; pattern = '/*.map' ; fnames = dir(fullfile(dirName, pattern)); numfids = length(fnames); all=[]; for K = 1:numfids pathName = strcat(dirName,fnames(K).name); display(fnames(K).name); all = [ all load( pathName ) ] ; end