Sorting an array without regard to the sign of the numbers
조회 수: 2 (최근 30일)
이전 댓글 표시
I have an Array of 7765 x 4 that I want to sort. It looks like this:
1110 -390.121000 -10.454900 -0.01882277
1501 3.187177047 5.32644003 167.2790029
1805 4.821873268 5.60381016 190.0584265
2109 4.722658634 5.56606016 190.5110412
2413 3.200538391 5.10077007 167.6860615
I want to sort it in a way that the largest value in terms of amount from columns 2 to 4 is in column 2. The problem is that I don't want to lose the sign of the values. For the example it should look like this in the end
1110 -390.121000 -10.454900 -0.01882277
1501 167.2790029 5.32644003 3.187177047
1805 190.0584265 5.60381016 4.821873268
2109 190.5110412 5.56606016 4.722658634
2413 167.6860615 5.10077007 3.200538391
Has anyone any Idea how I can do that?
댓글 수: 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!