Documentation Center

  • Trial Software
  • Product Updates

comm.Descrambler System object

Package: comm

Descramble input signal


The Descrambler object descrambles a scalar or column vector input signal. The Descrambler object is the inverse of the Scrambler object. If you use the Scrambler object in a transmitter, then you use the Descrambler object in the related receiver.

To descramble a scalar or column vector input signal:

  1. Define and set up your descrambler object. See Construction.

  2. Call step to descramble an input signal according to the properties of comm.Descrambler. The behavior of step is specific to each object in the toolbox.


H = comm.Descrambler creates a descrambler System object™, H. This object descrambles the input data using a linear feedback shift register that you specify with the Polynomial property.

H = comm.Descrambler(Name,Value) creates a descrambler 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).

H = comm.Descrambler(N,POLY,COND,Name,Value) creates a descrambler object, H. This object has the CalculationBase property set to N, the Polynomial property set to POLY, the InitialConditions property set to COND, and the other specified properties set to the specified values.



Range of input data

Specify calculation base as a positive, integer, scalar value. The step method input and output integers are in the range [0, CalculationBase–1]. The default is 4.


Linear feedback shift register connections

Specify the polynomial that determines the shift register feedback connections. The default is [1 1 1 0 1]. You can the generator polynomial as a numeric, binary vector that lists the coefficients of the polynomial in order of ascending powers of z-1, where p(z–1) = 1 + p1z–1 + p2z-2 + ... is the generator polynomial. The first and last elements must be 1. Alternatively, you can specify the generator polynomial as a numeric vector. This vector contains the exponents of z-1 for the nonzero terms of the polynomial, in order of ascending powers of z–1. In this case, the first vector element must be 0. For example, both [1 0 0 0 0 0 1 0 1] and [0 -6 -8] specify the same polynomial .


Initial values of linear feedback shift register

Specify the initial values of the linear feedback shift register as an integer row vector with values in [0 CalculationBase–1]. The default is [0 1 2 3]. The length of this property vector must equal the order of the Polynomial property vector.


cloneCreate descrambler 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 descrambler object
stepDescramble input signal


Scramble and descramble random data with values in the range [0 7].

    % Create scrambler and descrambler objects with calculation base of 8
    N = 8;
    hSCR = comm.Scrambler(N, [1 0 1 1 0 1 0 1],...
            [0 3 2 2 5 1 7]);                  
    hDSCR = comm.Descrambler(N, [1 0 1 1 0 1 0 1],...
            [0 3 2 2 5 1 7]); 
    for counter = 1:10
      data = randi([0 N-1], 4, 1);
      scrData = step(hSCR, data);
      deScrData = step(hDSCR, scrData);
      [data, scrData, deScrData]


This object implements the algorithm, inputs, and outputs described on the Descrambler block reference page. The object properties correspond to the block parameters.

See Also


Was this topic helpful?