フィルターのクリア

New arrangement of column and row

1 回表示 (過去 30 日間)
nur yusof
nur yusof 2016 年 2 月 25 日
コメント済み: Star Strider 2016 年 2 月 25 日
How to rearrange column and row matrix?For example, I have 10x10 matrix size. what I really want to do is
A[1:10,1:10] %original position of column & row matrix size
A2[2 4 6 8 10 1 3 5 7 9,2 4 6 8 10 1 3 5 7 9] %New arrangement of column and row position in matrix
Hope anyone can guide me.Thank you.

採用された回答

Star Strider
Star Strider 2016 年 2 月 25 日
I’m not certain what you want as your result, but this looks correct to me:
K = randi(99,10)
K2 = K([2 4 6 8 10 1 3 5 7 9]',[2 4 6 8 10 1 3 5 7 9]')
You have to transpose the row and column reference vectors.
  2 件のコメント
nur yusof
nur yusof 2016 年 2 月 25 日
Thank you....thank you and thank you. It's working.Really appreciate your help.
Star Strider
Star Strider 2016 年 2 月 25 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by