How to make a big tridiagonal matrix with matrices?

 Respuesta aceptada

David Hill
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));

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 1 de Sept. de 2020

Respondida:

el 1 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by