Creating block tridiagonal matrix in matlab
<p>I am writing a Matlab code for a solution to a non-linear partial differential equations. I reached a point where I need an (M+1)^2 by (M+1)^2 block matrix containing say A as the main diagonal, B in position (i,i+1) while C in (i,i+2). i.e., B and C are above the main diagonal A.
Is there a short way to build such block matrices? </p>