Prev Next cawgn

Complex Additive White Gaussian Noise
Syntax y = cawgn(means,sigmas)
Syntax y = cawgn(means,sigmas,Nrows)
Syntax y = cawgn(means,sigmas,Nrows,Mcols)
Include: include spt\cawgn.oms
See Also awgn

ARGUMENTS:
   INPUTS:
      means  = VECTOR, 2-element, any numerical type. Mean
               values of the real and imaginary parts of
               the requested distribution. means(1)=real
               part mean, means(2) = imaginary part mean.
               Coerced to 'double' before local processing.
      sigmas = VECTOR, 2-element, any numerical type. Standard
               deviations of requested noise distribution.
               Coerced to 'double' before local processing.
               'sigmas' must be >0d0.
      Nrows =  SCALAR, any numerical type. Number of rows
               in returned matrix. Coerced to 'integer'
               before local processing. Nrows>=1.
      Ncols =  SCALAR, any numerical type. Number of columns
               in returned matrix. Coerced to INTEGER before
               local processing. Mvols>=1
   RETURN: MATRIX, type COMPLEX, Nrows X Mcols matrix
           of AWGN.

Description

Creates a complex-valued matrix of discrete samples of ADDITIVE WHITE GAUSSIAN NOISE(AWGN) with specified 'means' and standard deviations ('sigmas'). This function returns a Nrows X Ncols COMPLEX matrix where the element real and imaginary parts are samples of the a normally distributed random variable. The means and standard deviations of the real and imaginary parts are indiviually specifiable through column vector arguments 'means' and 'sigmas' as follows:
   means(1)  = mean of real part
   means(2)  = mean of imaginary part
   sigmas(1) = standard deviation of real part
   sigmas(2) = standard deviation of imaginary part

Example
Create a single sample, a vector of 5 samples, and a 5x3 array of complex additive white Gaussian noise.

O>cawgn({0,.5},{1,2})
( 0.40, 0.91) 

O>cawgn({0,.5},{1,2},5)
{
(-0.93, 0.07)
(-2.32, 0.25)
(-0.62, 0.81)
( 0.23, 0.31)
(-0.04, 0.84)
}

O>cawgn({0,.5},{1,2},5,3)
{
[ (-0.01, 2.12) , ( 0.44, 1.00) , (-0.75,-1.69) ]
[ ( 0.21, 2.60) , ( 0.62,-0.04) , (-0.47, 0.28) ]
[ ( 2.01,-1.37) , (-0.18, 0.31) , ( 0.34, 2.52) ]
[ (-0.12,-1.61) , (-0.05, 2.65) , (-0.98, 0.27) ]
[ ( 0.13, 4.41) , (-0.53,-1.01) , ( 1.31, 1.14) ]
}