MATLAB Answers

Algorithmically create block matrices

16 views (last 30 days)
I want to create a block matrix out of square matrices with the following structure
H = [A B C D;
B A B C;
C B A B;
D C B A]
Cleraly, if I was interested in only a 4x4 block, this would be enough. However, I'm interested in constructing such matrices out of a set of N square matrices A,B,C,D,E ... forming an N by N matrix of square matrices. Suppose I define
Matrices = [A B C D E];
What is the code I need to construct the corresponding 5 by 5 block matrix?


Sign in to comment.

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 17 Dec 2020

  1 Comment

David Cyncynates
David Cyncynates on 17 Dec 2020
oh i see - cycle through Matrices and then cat. Thanks!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!