How to embed matrices in the diagonal of a matrix?

2 ビュー (過去 30 日間)
Swati Sarangi
Swati Sarangi 2020 年 1 月 27 日
コメント済み: Walter Roberson 2020 年 1 月 27 日
Hi all,
I am stuck at the following problem. I've been given three matrices namely; A=[ 2 6 ;3 9] , B=[ 1 2 ; 3 4 ] , C=[-5 5 ;5 3] and I'm supposed to form a matrix 6x6 out of A B and C which looks like D= [ 2 6 0 0 0 0 ; 3 9 0 0 0 0 ; 0 0 1 2 0 0; 0 0 3 4 0 0; 0 0 0 0 -5 5; 0 0 0 0 5 3] . How can I embed these matrices to get a matrix D?
Thanks and Regards
Swati

採用された回答

Walter Roberson
Walter Roberson 2020 年 1 月 27 日
blkdiag()
  2 件のコメント
Swati Sarangi
Swati Sarangi 2020 年 1 月 27 日
編集済み: Swati Sarangi 2020 年 1 月 27 日
Thanks :)
Walter Roberson
Walter Roberson 2020 年 1 月 27 日
It looks like it to me

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by