How to make a big tridiagonal matrix with matrices?
1 次查看(过去 30 天)
显示 更早的评论
How can I make a matrix H from two smaller matrices
as shown in the attached image?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/354656/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/354659/image.png)
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!