On entry: the lower triangle of the
$n$ by
$n$ positive definite symmetric band matrix
$A$, with the diagonal of the matrix stored in the
$\left(m+1\right)$th column of the array, and the
$m$ subdiagonals within the band stored in the first
$m$ columns of the array. Each row of the matrix is stored in the corresponding row of the array. For example, if
$n=5$ and
$m=2$, the storage scheme is
The elements in the top left corner of the array are not used. The following code may be used to assign elements within the band of the lower triangle of the matrix to the correct elements of the array:
DO 20 I = 1, N DO 10 J = MAX(1,I-M), I A(I,J-I+M+1) = matrix(I,J) 10 CONTINUE 20 CONTINUE