Prev Next awgn

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

ARGUMENTS:  
   INPUTS:
      mean  = SCALAR, any numerical type. Mean value of
              requested noise distribution. Coerced to
              DOUBLE before local processing.
      sigma = SCALAR, any numerical type. Standard
              deviation of requested noise distribution.
              Equivalent to the RMS value of the noise.
              Coerced to DOUBLE before local
              processing.
      Nrows = SCALAR, any numerical type. Number of rows
              in returned matrix. Coerced to INTEGER
              before local processing.  
      Ncols = SCALAR, any numerical type. Number of
              columns in returned matrix. Coerced to
              'integer' before local processing.  
   RETURN: MATRIX, type 'double', Nrows X Mcols matrix of AWGN.

Description

Creates a matrix of discrete samples of ADDITIVE WHITE GAUSSIAN NOISE (AWGN) with specified 'mean' and standard deviation 'sigma'.

This function returns discrete independent identically distributed samples of the normally (gaussian) distributed random variable. The result has a user-defined mean and standard deviation.

Example
Create a single sample, a vector of 6 samples, and a 6x5 array of samples of additive white Gaussian noise.

O>awgn(0,1)
-0.26 
O>awgn(0,1,6)
{
-0.65
-0.35
 0.67
 1.07
 0.38
-0.47
}

O>awgn(0,1,6,5)
{
[  1.19 ,  0.87 ,  2.46 ,  0.77 ,  0.06 ]
[  1.57 , -0.38 , -0.99 ,  0.95 ,  0.20 ]
[ -0.41 ,  0.09 ,  0.65 , -1.02 ,  1.59 ]
[ -0.70 , -1.12 , -0.22 , -1.54 ,  0.43 ]
[ -0.82 , -0.03 ,  1.17 ,  0.46 , -1.46 ]
[  0.61 ,  0.48 , -0.28 ,  0.92 ,  1.59 ]
}