MATLAB: Sort elements in a cell , they are all txt file names

cell arrayssort

files ={'200802291600.1.txt';
'200803011600.1.txt';
'200803021600.1.txt';
'200803031600.1.txt';
'200803041600.1.txt';
'200803051600.1.txt';
'200803061600.1.txt';
'200803071600.1.txt'}
these are the files' names stored in a cell ,sometimes they are in mess ,
how to sort them by time ,thanks for doing sth.

Best Answer

  • out = sort(files);