I have
a= 3 16
6 22
2 6
1 25
4 4
I need to sort 2nd column and keep the entire matrix according to sort of second column
i wan the output as
b=4 4
2 6
3 16
6 22
1 25

 채택된 답변

the cyclist
the cyclist 2012년 6월 4일

0 개 추천

b = sortrows(a,2);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

질문:

2012년 6월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by