Hello everybody,
I am having a problem with the sortrows. I am sorting filenames alphabetically but I get a different sorted list than what Windows shows in the Explorer.
Here is how I sort with Matlab:
>> sorted = sortrows({'abc1_test.txt'; 'abc11_test.txt'})sorted = 'abc11_test.txt' 'abc1_test.txt'
The Matlab display of the current folder and the Windows Explorer show a different sorting:
So for some reason, sortrows prefers numbers over underscore while Windows and even the Matlab display have it vice versa.
Is this a bug? What can I do to get the same sorting result in my Matlab scripts?
Regards
Stephan
Best Answer