How to create big matrix that the item is small matrix

3 vues (au cours des 30 derniers jours)
DoinK
DoinK le 27 Mai 2023
Modifié(e) : Matt J le 27 Mai 2023
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

Réponses (1)

Matt J
Matt J le 27 Mai 2023
Modifié(e) : Matt J le 27 Mai 2023
Then replace the last D block with F,
Matrix(end-11:end,end-11:end)=F;

Catégories

En savoir plus sur Operating on Diagonal Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by