EngeeComms.BernoulliBinaryGenerator
Generates random binary numbers using a Bernoulli distribution.
| Library |
|
| Block |
Description
System object EngeeComms.BernoulliBinaryGenerator generates random binary numbers using a Bernoulli distribution. Use this system object to generate random bits of data to simulate digital communication systems and obtain performance indicators such as bit error rate.
Bernoulli distribution with parameter gives zero with probability and one with probability . The Bernoulli distribution has an average value and variance . The ProbabilityOfZero parameter sets the value of the variable and can be any real number in the range [0, 1].
To generate random binary numbers using the Bernoulli distribution, follow these steps:
-
Create an object EngeeComms.BernoulliBinaryGenerator and set its properties.
-
Call an object with arguments as if it were a function.
To learn more about how to work with system objects, see Engee System Objects.
Syntax
Creation
-
bergen = EngeeComms.BernoulliBinaryGenerator()— creates a system object for generating random binary numbers using the Bernoulli distribution usagebergenwith properties by default.Example:
bergen = EngeeComms.BernoulliBinaryGenerator() -
bergen = EngeeComms.BernoulliBinaryGenerator(Name=Value)— creates a system objectbergenwith the specified properties as a pairName=Value, whereName— the name of the property, andValue— appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their by default values.Example:
bergen = EngeeComms.BernoulliBinaryGenerator(InitialSeed=5)
Properties
#
InitialSeed —
initial value
Int64 integer
Details
Initial value for the random number generator as a non-negative integer. If the InitialSeed property is a constant, the resulting sequence will be repeated.
Dependencies
To use this parameter, set the property SourceOfInitialSeed property to Parameter.
#
ProbabilityOfZero —
output probability of zero
Scalar / vector of real numbers
Details
The probability of getting zero on the output must be in the range [0, 1].
The number of elements in the ProbabilityOfZero parameters corresponds to the number of independent channels output from the system object. Bernoulli distribution with the parameter gives zero with probability and one with probability .
#
SourceOfInitialSeed —
initial value source
String
Details
Source of initial value for the random number generator in the form:
-
Parameter- the system object sets the initial value of the random number generator in the * property.InitialSeed*.
#
SamplesPerFrame —
counts per output frame
Int64 integer
Details
Counts per frame as a positive integer indicating the number of counts per frame in one output data channel.
#
OutputDataType —
output data type
String
Details
Selects the data type for the output signal type.
| Data types |
|