フィルターのクリア

How sort rows of matrix as per given index

16 ビュー (過去 30 日間)
Vishal Sharma
Vishal Sharma 2017 年 8 月 10 日
回答済み: KSSV 2017 年 8 月 10 日
I have a matrix, A A = [1 2 3, 4 5 6, 7 8 9];
I want to sort rows of this matrix as per sequence of [2nd row; 3rd row; 1st row]
Thanks & Regards

採用された回答

KSSV
KSSV 2017 年 8 月 10 日
A = [1 2 3 ; 4 5 6 ; 7 8 9];
idx = [2 3 1] ;
A = A(idx,:)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by