필터 지우기
필터 지우기

Sorting along column

조회 수: 2 (최근 30일)
Karthik KJ
Karthik KJ 2012년 6월 18일
Hi,
I have a matrix
a =
-5 30 120
-10 15 240
after sort(a) I am getting
-10 30 120
-5 15 240
But how can i get column 2 and column to align accordingly, means i need the output as
-10 15 240
-5 30 120
How can i get this ?

채택된 답변

the cyclist
the cyclist 2012년 6월 18일
Use the sortrows() function.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by