Sort cell array by datetime
이전 댓글 표시
I want to sort an array, that looks like the one below, by datetime.
70 26-Nov-2020 10:50:29
84 26-Nov-2020 10:00:00
79.5 26-Nov-2020 14:35:20
53 29-Nov-2020 12:31:00
Any idea how to do this?
채택된 답변
추가 답변 (1개)
Eric Sofen
2021년 1월 5일
Even better, since you're working with data where each column has a different type, consider using a timetable.
t = table2timetable(cell2table(a));
t = sortrows(t);
카테고리
도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!