Generate uniformly distributed noise between upper and lower bounds

Noise Generators sublibrary of Comm Sources

The Uniform Noise Generator block generates uniformly distributed noise. The output data of this block is uniformly distributed between the specified lower and upper bounds. The upper bound must be greater than or equal to the lower bound.

You must specify the **Initial seed** in the
simulation. When it is a constant, the resulting noise is repeatable.

If all the elements of the output vector are to be independent
and identically distributed (i.i.d.), then you can use a scalar for
the **Noise lower bound** and **Noise upper
bound** parameters. Alternatively, you can specify the range
for each element of the output vector individually, by using vectors
for the **Noise lower bound** and **Noise
upper bound** parameters. If the bounds are vectors, then
their length must equal the length of the **Initial seed** parameter.

The output signal can be a frame-based matrix, a sample-based
row or column vector, or a sample-based one-dimensional array. These
attributes are controlled by the **Frame-based outputs**, **Samples
per frame**, and **Interpret vector parameters as
1-D** parameters.

The number of elements in the **Initial seed** parameter
becomes the number of columns in a frame-based output or the number
of elements in a sample-based vector output. Also, the shape (row
or column) of the **Initial seed** parameter becomes
the shape of a sample-based two-dimensional output signal.

**Noise lower bound, Noise upper bound**The lower and upper bounds of the interval over which noise is uniformly distributed.

**Initial seed**The initial seed value for the random number generator.

**Sample time**The period of each sample-based vector or each row of a frame-based matrix.

**Frame-based outputs**Determines whether the output is frame-based or sample-based. This box is active only if

**Interpret vector parameters as 1-D**is unchecked.**Samples per frame**The number of samples in each column of a frame-based output signal. This field is active only if

**Frame-based outputs**is checked.**Interpret vector parameters as 1-D**If this box is checked, then the output is a one-dimensional signal. Otherwise, the output is a two-dimensional signal. This box is active only if

**Frame-based outputs**is unchecked.**Output data type**The output can be set to

`double`

or`single`

data types.

Random Source (DSP System Toolbox™ documentation); `rand`

(built-in MATLAB^{®} function)

Was this topic helpful?