What do I have to add at the beginning of this loop?
问题 how I can read the following files using the for loop: (can the loop ignore the characters in filenames?) abc-1.TXT cde-2.TXT ser-3.TXT wsz-4.TXT aqz-5.TXT iop-6.TXT What do I have to add at the beginning of this loop ?? for i = 1:1:6 nom_fichier = strcat(['MyFile\.......' num2str(i) '.TXT']); 回答1: You can avoid constructing the filenames by using the DIR command. For instance: myfiles = dir('*.txt'); for i = 1:length(myfiles) nom_fichier = myfiles(i).name; ...do processing here... end 回答2: