Comments on: file1, file10, file2 sorting problem: solved https://blogs.mathworks.com/pick/2006/09/11/file1-file10-file2-sorting-problem-solved/?s_tid=feedtopost Jiro and Sean share favorite user-contributed submissions from the File Exchange. Tue, 10 May 2016 18:33:14 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Doug Schwarz https://blogs.mathworks.com/pick/2006/09/11/file1-file10-file2-sorting-problem-solved/#comment-598 Mon, 18 Sep 2006 14:51:38 +0000 https://blogs.mathworks.com/pick/?p=1898#comment-598 I have always been dissatisfied with one aspect of sort_nat, namely that it doesn’t sort strings containing equal numbers and leaves those strings in their original order. For example, {‘a000′,’a0′,’a00’} would be left in that order. I have fixed this and imposed a sort order that is the same as what one would get with a normal sort: {‘a0′,’a00′,’a000’}. I have also relaxed the version requirement so sort_nat should work with much older versions of MATLAB. Oh yeah, it’s also a little faster. Enjoy!
Doug

]]>
By: Urs (us) Schwarz https://blogs.mathworks.com/pick/2006/09/11/file1-file10-file2-sorting-problem-solved/#comment-516 Mon, 11 Sep 2006 19:57:00 +0000 https://blogs.mathworks.com/pick/?p=1898#comment-516 interesting: ASORT has been out for over a year… nevertheless: congrats from one schwarz to another…
us

]]>