loop through subjects in Matlab path to run a program in subfolders
Ältere Kommentare anzeigen
I am trying to loop through multiple subjects in multiple subfolders
This is what I want to do in the long run assuming I am working weith a single subject
"%direc = dir(['/Users/konan/Documents/Data/PO1/*.HWR']);"
path1 = '/Users/konan/Documents/Data/';
path2 = 'P01/'; (I want to loop through subject P1 - P90)
path3 = '*.HWR';
direc = dir([fullfile(path1,path2, path3)]);
3 Kommentare
Walter Roberson
am 11 Feb. 2023
Do there exist P____ folders that are not P<digit><digit> ?
Is it important to loop folder by folder, or would it be okay to just go ahead and generate all of the file names in one shot (knowing that they could be classified by folder later if needed) ?
Reuben Addison
am 11 Feb. 2023
Walter Roberson
am 11 Feb. 2023
Is there, for example, a Pie_Recipes folder? A Photographs folder? Any other folder whose name begins with P but which is not P<digit><digit> ?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!