How to create big matrix that the item is small matrix

조회 수: 3 (최근 30일)
DoinK
DoinK 2023년 5월 27일
편집: Matt J 2023년 5월 27일
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