Documentation Center

  • Trial Software
  • Product Updates

comm.DifferentialDecoder System object

Package: comm

Decode binary signal using differential decoding

Description

The 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:

  1. Define and set up your differential decoder object. See Construction.

  2. Call step to decode a binary signal according to the properties of comm.DifferentialDecoder. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.DifferentialDecoder creates a differential decoder System object™, H. This object decodes a binary input signal that was previously encoded using a differential encoder.

H = comm.DifferentialDecoder(Name,Value) creates object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

InitialCondition

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 0. The object treats nonbinary values as binary signals.

Methods

cloneCreate differential decoder object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset states of differential decoder object
stepDecode binary signal using differential decoding

Examples

Decode a differentially encoded signal.

% Create Differential Encoder System object
    hdiffenc = comm.DifferentialEncoder;
% Create Differential Decoder System object
    hdiffdec = comm.DifferentialDecoder;
% Generate random binary data
    data = randi([0 1], 100, 1);
% Encode data
    encdata = step(hdiffenc,data);
% Decode data
    recdata = step(hdiffdec, encdata);
    errors = biterr(data, recdata);
    fprintf(1, ['\nThere were %d errors in the decoded signal ' ...
                'out of %d bits\n'],errors, length(data));

Algorithms

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.

See Also

Was this topic helpful?