R/ensembles.R

rGOE <- function(n) {
  
  v <- stats::rnorm(n^2, mean = 0, sd = 1)
  M <- matrix(v, n, n)
  #M <- rWigner(n)
  M <- (M + t(M))/sqrt(2)
  return(M)
  
}

rGUE <- function(n) {
  
  M <- rWigner(n, type = "complex")
  M <- (M + t(Conj(M)))/sqrt(2)
  return(M)
  
}
svazzole/randomMatRices documentation built on May 30, 2019, 8:45 p.m.