1
Seeking a one-liner MATLAB function / command to sort by date the output of:
filenames = dir(filenameSubstring); % retruns struct
sortrows() is for matrices and seems to rely on the sorting column to be a number.
Seeking to avoid re-inventing the wheel and using MATLAB's stock capability. If a one-liner is not possible, then concise solutions are appreciated.
UPDATE
Two-Liner per first comment in Mathworks blog:
%% Sort the struct by file save date
[tmp ind]=sort({filenames.date});
filenames=filenames(ind);
1Good observation. – gatorback – 2018-06-19T20:46:42.687