フィルターのクリア

How to make a big tridiagonal matrix with matrices?

1 回表示 (過去 30 日間)
Udvas.C
Udvas.C 2020 年 9 月 1 日
回答済み: David Hill 2020 年 9 月 1 日
How can I make a matrix H from two smaller matrices as shown in the attached image?

採用された回答

David Hill
David Hill 2020 年 9 月 1 日
h=size(H0);
a=[H0,zeros(h);zeros(h),H0];
b=[zeros(h),H1;H1,zeros(h)];
H=blkdiag(a,a,a,a,a,a)+blkdiag(b,b,b,b,b,b)+blkdiag(zeros(h),b,b,b,b,b,zeros(h));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by