Hi all,I am using an recursive program to list out all c files inside a directory which contains folders and subfolders through recursion but i m getting out of memory issue,Can anybody suggest me ?? I think i need a terminating condition in for loop
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
function search() Directory='C:\Users\Admin\Downloads'; [NeuronFileList]=findAllNeuronFiles(Directory); function NeuronFileList=findAllNeuronFiles(Directory)
NeuronFileList=dir(fullfile(Directory,'*.c'));
ListSubFold=dir(Directory); ListSubFold=ListSubFold([ListSubFold(:).isdir]);
for i=1:numel(ListSubFold) if ~strcmp(ListSubFold(i).name,'.') ~strcmp(ListSubFold(i).name,'..') NeuronFileList=[NeuronFileList;findAllNeuronFiles(fullfile(Directory,ListSubFold(i).name))]; end end
end end
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!