Rearrange matrix rows in specific order
25 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix whose rows I would like to re-order in a specific order
e.g.,) I need the order of the rows to go from [1 2 3 4 5 6 7] to lets say [2 3 4 5 1 6 7] ?
0 件のコメント
回答 (1 件)
C B
2021 年 11 月 9 日
Matrix_A = [1 1 1;2 2 2;3 3 3 ; 4 4 4; 5 5 5; 6 6 6; 7 7 7]
Inp = [2 3 4 5 1 6 7];
Output = Matrix_A(Inp,:)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!