sort 3 column matrix by two key words
조회 수: 2 (최근 30일)
이전 댓글 표시
how to do this in matlab? sort the matrix raws first by the first column, then by the second column?
input = [
1 2 11
1 2 11
1 2 12
1 2 11
1 2 11
1 2 12
1 3 17
1 3 15
1 4 18
1 4 18
1 3 15
1 3 16
2 3 17
2 3 15
1 3 16
1 3 17
1 3 15
1 3 15
1 3 15
1 3 16
1 2 12
1 2 11
1 2 11
1 2 11
1 4 18
1 4 18
1 4 18
2 4 17
2 4 17
1 4 17
1 4 17
1 4 17
]
output = [1 2 11
1 2 11
1 2 12
1 2 11
1 2 11
1 2 12
1 2 12
1 2 11
1 2 11
1 2 11
1 3 17
1 3 15
1 3 15
1 3 16
1 3 16
1 3 17
1 3 15
1 3 15
1 3 15
1 3 16
1 4 18
1 4 18
1 4 18
1 4 18
1 4 18
1 4 17
1 4 17
1 4 17
2 3 17
2 3 15
2 4 17
2 4 17
]
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 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!