Binary Symmetric Channel
Introduce binary errors
Communications Toolbox / Channels
The Binary Symmetric Channel block introduces errors to the input signal transmitted through a binary symmetric channel. The errors are introduced based on the specified Error probability. For more information, see Tips.
Output — Binary output signal
column vector | matrix
Err — Error locations
column vector | matrix
Error locations, returned as a column vector or matrix with the same
Input. Element values in
1indicates that the corresponding element in
Outputhas an error.
0indicates that the corresponding element in
Outputdoes not have an error.
To enable this port, select Output error vector.
Error probability — Probability of error occurrence
0.05 (default) | scalar
Probability of error occurrence for the input signal elements, specified as a scalar in the range [0,1]. The probability of error applies independently for each element.
Output error vector — Option to output error locations
on (default) |
To enable the
Err output port to the block, select
Output data type — Output data type
double (default) |
Select the output data type as
boolean. This parameter
sets the output data type for both the Output and
Initial seed — Initial seed
71 (default) | integer
Initial seed value for the random number generator used by the block, specified as an
integer. The block uses the
mt19937ar algorithm to
generate uniformly distributed random numbers. For details about the
mt19937ar algorithm, see Creating and Controlling a Random Number Stream.
Simulate using — Type of simulation to run
Code generation (default) |
Type of simulation to run, specified as:
Code generation–– Simulate the model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations as long as the model does not change. This option requires additional startup time.
Interpreted execution–– Simulate the model using the MATLAB® interpreter. This option shortens startup time. In
Interpreted executionmode, you can debug the source code of the block.
When the input consists of not
Booleanvalues, Binary Symmetric Channel converts zero-valued elements to 0 and converts nonzero-valued elements to 1.
The Binary Symmetric Channel block creates and uses an independent
RandStreamto provide a random number stream for probability determination.
To generate repeatable results, use the same Initial seed value.
To generate independent probability statistics, set different Initial seed values for multichannel signals, multiple processing chains, or simulation runs.