HOW TO SHIFT COLUMN AND ROW MATRIX

hy guys. please help me, I dont know to shift column and row in matlab. please see image below. thanks. :)

 採用された回答

Matt J
Matt J 2021 年 1 月 19 日
編集済み: Matt J 2021 年 1 月 19 日

1 投票

x=repmat([1 2 3 4],4,1); x(6,6)=0
x = 6×6
1 2 3 4 0 0 1 2 3 4 0 0 1 2 3 4 0 0 1 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0
perm=[1,2,5,6,3,4];
x(perm,perm),
ans = 6×6
1 2 0 0 3 4 1 2 0 0 3 4 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 3 4 1 2 0 0 3 4

3 件のコメント

Wahyu A
Wahyu A 2021 年 1 月 19 日
Cool. Its works. Thanks a lot😀
Matt J
Matt J 2021 年 1 月 19 日
You're welcome, but please Accept-click the answer to indicate that it worked.
Wahyu A
Wahyu A 2021 年 1 月 19 日
Noted sir, thanks for the answer

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

製品

質問済み:

2021 年 1 月 19 日

コメント済み:

2021 年 1 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by