tridiag: Create sparse tridiagonal matrix
Description
Create a sparse tridiagonal matrix of dgcMatrix class.
Usage
tridiag(n, x = NULL, y = NULL, z = NULL)
Value
Sparse tridiagonal matrix of class 'dgcMatrix'
Arguments
- n
dimension of the square matrix
- x
subdiagonal (-1)
- y
diagonal (0)
- z
superdiagonal (+1)