Decode binary signal using differential decoding
DifferentialDecoder object decodes the
binary input signal. The output is the logical difference between
the consecutive input element within a channel.
To decode a binary signal using differential decoding:
Define and set up your differential decoder object. See Construction.
step to decode a binary signal
according to the properties of
The behavior of
step is specific to each object in
Starting in R2016b, instead of using the
H = comm.DifferentialDecoder creates a
differential decoder System object,
object decodes a binary input signal that was previously encoded using
a differential encoder.
H = comm.DifferentialDecoder( creates
H, with each specified property set to
the specified value. You can specify additional name-value pair arguments
in any order as (
Initial value used to generate initial output
Specify the initial condition as a real scalar. This property
can have a logical, numeric, or fixed-point (embedded.fi object) data
type. The default is
|reset||Reset states of differential decoder object|
|step||Decode binary signal using differential decoding|
|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
Create a differential encoder and decoder pair.
diffEnc = comm.DifferentialEncoder; diffDec = comm.DifferentialDecoder;
Generate random binary data. Differentially encode and decode the data.
data = randi([0 1],100,1); encData = diffEnc(data); decData = diffDec(encData);
Determine the number of errors between the original data and the decoded data.
numErrors = biterr(data,decData)
numErrors = 0
This object implements the algorithm, inputs, and outputs described on the Differential Decoder block reference page. The object properties correspond to the block parameters, except:
|The object only supports single channel, column vector inputs.|
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).