MATLAB: Block Tri-diagonal Matrix

block tri-diagonal matrixlinear algebra

In the process of a solvng a system of coupled pdes I have finally got a block tri-diagonal matrix. How to write the whole matrix in MATLAB. Is there any built in function to write such kind of block tri-diagonal matrix?

Best Answer

It may be your lucky day. Just download my blktridiag code from the file exchange.
It is designed to create a sparse block tridiagonal array, exactly what you will want.
Related Question