| cholesky | R Documentation |
Compute Cholesky decomposition of a matrix.
cholesky(A)
A |
matrix to decompose |
upper triangular matrix R such that A = U'U.
harmonicHMC()
# Larger example
set.seed(123)
B <- matrix(rnorm(16), 4, 4)
B <- t(B) %*% B # Make symmetric positive definite
U <- cholesky(B)
U
# Verify decomposition
all.equal(B, t(U) %*% U)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.