How to sort a matrix by row based on an index array

Hi, I have an index array ib which is a result of two table joining. I have a matrix M, I would like to sort M by rows according to ib. For example, if ib is [2, 1, 3], I would like the 2nd row to move up to be the first row. How to do that? Thanks!

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

태그

질문:

JFz
2018년 1월 8일

답변:

2018년 1월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by