Introduce binary errors
BinarySymmetricChannel object introduces
binary errors to the signal transmitted through this channel.
To introduce binary errors into the transmitted signal:
Define and set up your binary symmetric channel object. See Construction.
step to introduces binary
errors into the signal transmitted through this channel according
to the properties of
comm.ACPR. The behavior of
specific to each object in the toolbox.
Starting in R2016b, instead of using the
H = comm.BinarySymmetricChannel creates
a binary symmetric channel System object,
that introduces binary errors to the input signal with a prescribed
H = comm.BinarySymmetricChannel( creates
a binary symmetric channel object,
H, with each
specified property set to the specified value. You can specify additional
name-value pair arguments in any order as (
Probability of binary error
Specify the probability of a binary error as a scalar with a
Enable error vector output
When you set this property to
Data type of output
Specify output data type as one of
|step||Introduce binary errors|
|Common to All System Objects|
Create System object with same property values
Expected number of inputs to a System object
Expected number of outputs of a System object
Check locked states of a System object (logical)
Allow System object property value changes
Add binary errors with a probability of 0.2 to a binary input signal
binSymChan = comm.BinarySymmetricChannel('ErrorProbability',0.2); data = randi([0 1],1000,1); [~,err] = binSymChan(data);
Confirm that the number errors is approximately equal to the 0.2 multiplied by the number of symbols.
ans = 188 200
This object implements the algorithm, inputs, and outputs described on the Binary Symmetric Channel block reference page. The object properties correspond to the block parameters, except:This object uses the MATLAB® default random stream to generate random numbers. The block uses a random number generator based on the V5 RANDN (Ziggurat) algorithm. An initial seed, set with the Initial seed parameter initializes the random number generator. For every system run that contains the block, the block generates the same sequence of random numbers. To generate reproducible numbers using this object, you can reset the MATLAB default random stream using the following code.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).