View source: R/functions.linalg.R
tridiag | R Documentation |
Constructs a tridiagonal matrix from three vectors supplied. The matrix size is adjusted according to the first vector (n). The function fails, if the other two dimensions are less than n-1. However, if the dimensions are larger, the function will truncate the vectors b and c.
tridiag(a, b, c = b)
a |
A vector of size n, whose entries will form a diagonal. No default value. |
b |
A vector of size n-1, whose entries will form a sub-diagonal. No default value. |
c |
A vector of size n-1, whose entries will form a super-diagonal. Defaults is c = b. |
tridiag(c(1,2,3), c(4,5,6)) tridiag(c(1,2,3), c(4,5,6), c(7,8,9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.