data = GMMB_MKCPLX(mu, sigma, N) Generate complex Gaussian data Generates N points of complex valued data according to complex Gaussian distribution with parameters (mu, sigma). data = N x D list of vectors (complex) mu = 1 x D vector (complex) sigma = D x D matrix (complex, positive semi-definite) Author: Pekka Paalanen <pekka.paalanen@lut.fi> References: Y. L. Tong, The Multivariate Normal Distribution, Springer Series in Statistics, Springer-Verlag New York, 1990 p. 185 $Id: gmmb_mkcplx.m,v 1.1 2004/11/02 08:32:22 paalanen Exp $
0001 % data = GMMB_MKCPLX(mu, sigma, N) Generate complex Gaussian data 0002 % 0003 % Generates N points of complex valued data according to 0004 % complex Gaussian distribution with parameters (mu, sigma). 0005 % 0006 % data = N x D list of vectors (complex) 0007 % mu = 1 x D vector (complex) 0008 % sigma = D x D matrix (complex, positive semi-definite) 0009 % 0010 % Author: 0011 % Pekka Paalanen <pekka.paalanen@lut.fi> 0012 % 0013 % References: 0014 % Y. L. Tong, The Multivariate Normal Distribution, 0015 % Springer Series in Statistics, Springer-Verlag New York, 1990 0016 % p. 185 0017 % 0018 % $Id: gmmb_mkcplx.m,v 1.1 2004/11/02 08:32:22 paalanen Exp $ 0019 0020 function data = mkcplx(mu, sigma, N); 0021 0022 D = size(mu,2); 0023 0024 [R, p] = chol(sigma); 0025 if p>0 0026 error('Sigma must be positive semi-definite.'); 0027 end 0028 0029 magn = randn(N, D); 0030 phase = rand(N, D).*pi; 0031 0032 data = complex(magn.*cos(phase), magn.*sin(phase)) * R + repmat(mu, N, 1);