How to make a big tridiagonal matrix with matrices?
조회 수: 3 (최근 30일)
이전 댓글 표시
How can I make a matrix H from two smaller matrices
as shown in the attached image?

댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!