mat.banded: Form a banded matrix from a vector of values
Description
Takes the first value in x and places it down the diagonal of the
matrix. Takes the second value in x and places it
down the first subdiagonal, both below and above the diagonal of the
matrix. The third value is placed in the second subdiagonal
and so on, until the bands for which there are elements in x have
been filled. All other elements in the matrix will be zero.
Usage
mat.banded(x, nrow, ncol)
Arguments
x
A numeric containing the values for each band from 1 to the
length of x.
nrow
The number of rows in the banded matrix being formed.
ncol
The number of columns in the banded matrix being formed.