How to create big matrix that the item is small matrix

3 次查看(过去 30 天)
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

回答(1 个)

Matt J
Matt J 2023-5-27
编辑:Matt J 2023-5-27
Then replace the last D block with F,
Matrix(end-11:end,end-11:end)=F;

类别

Help CenterFile Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by