How to make a big tridiagonal matrix with matrices?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Udvas.C
el 1 de Sept. de 2020
Respondida: David Hill
el 1 de Sept. de 2020
How can I make a matrix H from two smaller matrices
as shown in the attached image?

0 comentarios
Respuesta aceptada
David Hill
el 1 de Sept. de 2020
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!