build a block matrix from matrices

4 Ansichten (letzte 30 Tage)
SALMA ALJAWI
SALMA ALJAWI am 7 Apr. 2018
Kommentiert: SALMA ALJAWI am 8 Apr. 2018
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..

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 7 Apr. 2018
B = cell2mat(M);
provided that the M are all the same size. (It will work in some other cases as well.)
  1 Kommentar
SALMA ALJAWI
SALMA ALJAWI am 8 Apr. 2018
This is really helpful, thank you Walter..

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by