S <- quadform::cprod(rcmvnorm(3, mean=c(1,1i), sigma=diag(2)))
rcmvnorm(10, sigma=S)
rcmvnorm(10, mean=c(0,1+10i), sigma=S)
# Now try and estimate the mean (viz 1, 1i) and variance (S) from a
# random sample:
n <- 101
z <- rcmvnorm(n, mean=c(0,1+10i), sigma=S)
xbar <- colMeans(z)
Sbar <- quadform::cprod(sweep(z, 2, xbar))/n
Run the code above in your browser using DataLab