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 Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by