How to create big matrix that the item is small matrix

3 views (last 30 days)
I wish to create a 252*252 matrix with 21 row and column
every item have 12*12 matrix.
So 12*12 until 21 column and row =matrix 252*252
the main diagnonal is matrix D (12*12), upper diagonal is matrix T (12*12), and the last main diagonal is matrix F.
Manually, it looks like this
%12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
D T 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 D T 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 F

Answers (1)

Matt J
Matt J on 27 May 2023
Edited: Matt J on 27 May 2023
Then replace the last D block with F,
Matrix(end-11:end,end-11:end)=F;

Categories

Find more on Operating on Diagonal Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!