Constructs a positive definite matrix of dimension dim by forming
\(A^\top A\) from a random normal matrix \(A\) and then rescaling so the
maximum entry is 1.
Examples
set.seed(1)
S <- gen_pd_matrix(4)
isSymmetric(S)
#> [1] TRUE
max(S)
#> [1] 1
all(eigen(S, symmetric = TRUE)$values > 0)
#> [1] TRUE
