I have 500 files .TXT, for example:
abc-1.TXT
adfer-2.txt
affd-3.TXT
asxdcccc-4.TXT
...
How can I change the following program to achieve results in order of numbers in the filenames:
Names = dir('MyFile\*.TXT');
for i = 1:500
fn = strcat(['MyFile\' Names(i).name]);
...
is there a way to make the loop on the numbers contained in the file names?
the problem with the above program is that I got results that do not follow the order of the numbers contained in the file names.
THANK YOU to everyone who helped me to advance in my work.