How to sort a matrix ?

조회 수: 2 (최근 30일)
Sourav Kumar Sahu
Sourav Kumar Sahu 2021년 1월 31일
댓글: Sourav Kumar Sahu 2021년 2월 17일
I have a input matrix 'a', a=[10 0.9; 3 0.98; 16 0.6; 1 0.4]. The sorted matrix(output matrix) should be [1 0.4 ;3 0.98;10 0.9 ;16 0.6]. Can anybody help in getting the required results.
  댓글 수: 2
Ive J
Ive J 2021년 1월 31일
Sourav Kumar Sahu
Sourav Kumar Sahu 2021년 2월 17일
it worked thank you

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2021년 1월 31일
The sortrows function can likely do what you want.

카테고리

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