Sorting array by datetimes does not work
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I need to sort my array, notSorted.mat, by datetimes as strings. The code I use for this is the following:
[~, idx] = sort(datenum(notSorted(:,2), 'dd-MM-yyyy HH:mm'), 1, 'ascend');
sorted = notSorted(idx,:);
However, this does not work. Some values are still not correctly sorted. Does anybody know what went wrong?
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!