mat.banded {dae} R Documentation

## 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.

### Value

An nrow \times ncol matrix.

### Author(s)

Chris Brien

matmult, mat.ar1, mat.ar2, mat.ar3, mat.sar2, mat.exp, mat.gau, mat.ma1, mat.ma2, mat.arma mat.I, mat.J
      m <- mat.banded(c(1,0.6,0.5), 5,5)