build a block matrix from matrices

4 ビュー (過去 30 日間)
SALMA ALJAWI
SALMA ALJAWI 2018 年 4 月 7 日
コメント済み: SALMA ALJAWI 2018 年 4 月 8 日
I am trying to build a block matrix from square diagonal matrices e.g. M{1,1},M{1,2},M{2,1}, and M{2,2} and I need to transfer them to a big matrix B such that:
B=[M{1,1} M{1,2}]
[M{2,1},M{2,2}];
each M has the same dimension.. I appreciate any help..

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 7 日
B = cell2mat(M);
provided that the M are all the same size. (It will work in some other cases as well.)
  1 件のコメント
SALMA ALJAWI
SALMA ALJAWI 2018 年 4 月 8 日
This is really helpful, thank you Walter..

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

その他の回答 (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