matlab - Loop Through Loading Files Error With Same Name -
i have question how load in data multiple directories, files need load have same name. here's have far:
for = 1:numel(smoothlist1) % loop through smoothing directories path2 = sprintf('%s%s/trade-off_curves',path1,smoothlist1(i).name); cd(path2); disp(['changed directories ', path2]); data{i} = load('results.xy'); end i loop through each directory in list call smoothlist1. within each 'smoothlist1 directory, change directories ~/smoothlist1/curves/. within directory, there file called results.xy. need load each of results.xy file each ~smoothlist1/curves directory, unsure how that. have above loads in final results.xy file in last smoothlist1/curves/ directory.
so question is, how loop through loading in results.xy file multiple directories? have tried doing data(j) = results.xy, add counter j, did not work. load these results.xy files separate filenames well.
thank help.
Comments
Post a Comment