EngeeComms.BernoulliBinaryGenerator
Generates random binary numbers using the Bernoulli distribution.
Library |
|
Block |
Description
The system object EngeeComms.BernoulliBinaryGenerator generates random binary numbers using the Bernoulli distribution. Use this system object to generate random bits of data to simulate digital communication systems and obtain performance metrics such as bit error rates.
The Bernoulli distribution with parameter gives zero with probability and one with probability . The Bernoulli distribution has a mean of and a variance of . 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, perform the following steps:
-
Create an object EngeeComms.BernoulliBinaryGenerator and set its properties.
-
Call the 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 to generate random binary numbers using the Bernoulli distributionbergen
with by default properties.Example:
bergen = EngeeComms.BernoulliBinaryGenerator()
-
bergen = EngeeComms.BernoulliBinaryGenerator(Name=Value)
creates abergen
system object with the specifiedName
property set to the specifiedValue
value. You can specify additional arguments as a name-value pair in any order (Name1
=Value1
,…,NameN
=ValueN
).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.
Типы данных |
|