MATLAB: How to count number of folder count file I do know how to count the number of files within the folder like this, but is their way to file the number of folder inside the certain folder? (not file) Best Answer all_files = dir;all_dir = all_files([all_files(:).isdir]);num_dir = numel(all_dir); Related SolutionsMATLAB: Save a file inside a subfolder of a folder function out = functionTiago(A, Folder)subFolder = fullfile(Folder, 'SUBFOLDER');mkdir(subFolder)out = A + 5;save(fullfile(subFolder, 'Filename'), 'out');Use absoulte paths. MATLAB: Count G = randi(3, 45, 2);I = randi(3, 45, 2);sum(all(G == I, 2)) Related QuestionFullfile to contain multiply file extensionFiles with specific extensionHow to reduce the amount of time it takes MATLAB to change the current directory to a directory containing a large number of filesFigure count
Best Answer