# a symmetric, positive definite square matrix
y <- rWishart(1, 4, diag(3))[, , 1]
u <- chol(y)
identical(y, chol2symm(u))
identical(chol2symm(u), t(u) %*% u)
if (FALSE) {
u_greta <- cholesky_variable(3)
y_greta <- chol2symm(u)
}
Run the code above in your browser using DataLab