x=randnc(s) Same as randn but complex - generate an array of complex numbers which have unit variance. Note that real/imag parts each have variance 1/2. std(randnc([1,1000]))=1 std(real(randnc([1,1000])))=1/sqrt(2)
0001 function x=randnc(varargin) 0002 % x=randnc(s) 0003 % 0004 % Same as randn but complex - generate an array of complex numbers 0005 % which have unit variance. Note that real/imag parts each have 0006 % variance 1/2. 0007 % 0008 % std(randnc([1,1000]))=1 0009 % std(real(randnc([1,1000])))=1/sqrt(2) 0010 0011 x=complex(randn(varargin{:}),randn(varargin{:}))/sqrt(2);