How can I arrange the y-values in xyz-data in ascending order?
조회 수: 10 (최근 30일)
이전 댓글 표시
How can i change the values:
23.2 54.23 354.43
12.2 15.43 324.42
54.2 33.43 376.43
43.3 76.34 365.34
...
reorder so that the values in the second column are arranged in ascending order, but the (xyz)-triple still exists:
12.2 15.43 324.42
54.2 33.43 376.43
23.2 54.23 354.43
43.3 76.34 365.34
...
??
Thank you so much!
Harry
댓글 수: 0
채택된 답변
ME
2019년 10월 22일
You can use
sortrows(A, column)
where A is your array and column is the column you wish to sort.
추가 답변 (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!