|
Dear Juliette Salexa!
> I don't like the way when I apply the command:
> files = dir(*.5);
> I get a structure which automatically reorders the .5 files in my directory into alphabetical order. Is there away to rearrange all of the structure elements into a custom order very esaily ??
I'm not sure, if it is "very easily", but if you want to sort the files by the creation date, use:
Files = dir('*.5');
[dum, v] = sort(datenum({Files.date}));
Files = Files(v);
For Matlab 7.? DATENUM can be replaced, because DIR replies the numerical format already: ...sort({Files.datenum})...
For other orders, replace [v] by your favourite sequence.
Good luck, Jan
|