could anyone help me to rearrange the matrix in the required manner.

1 回表示 (過去 30 日間)
jaah navi
jaah navi 2019 年 9 月 11 日
編集済み: Bruno Luong 2019 年 9 月 12 日
I ma having a matrix A=[ 1 0 0 0;
2 0 0 0;
3 4 0 0;
5 6 7 0]
i need to rearrange the matrix in the following manner
A=[1 2 3 5;
0 0 4 6;
0 0 0 7;
0 0 0 0]

採用された回答

Bruno Luong
Bruno Luong 2019 年 9 月 11 日
  4 件のコメント
jaah navi
jaah navi 2019 年 9 月 12 日
yes.its my mistake
Bruno Luong
Bruno Luong 2019 年 9 月 12 日
編集済み: Bruno Luong 2019 年 9 月 12 日
I can only see one thing that you want beside A.' (but why don't you tell use what is the desired output)?
x = 1:min(size(A));
A(x,x) = A(x,x).'

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParticle & Nuclear Physics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by