This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Scramble input signal


Sequence Operations


The Scrambler block scrambles a scalar or column vector input signal. If you set the Calculation base parameter to N, then the input values must be integers between 0 and N-1.

One purpose of scrambling is to reduce the length of s of 0s or 1s in a transmitted signal, since a long of 0s or 1s may cause transmission synchronization problems. Below is a schematic of the scrambler. All adders perform addition modulo N.

At each time step, the input causes the contents of the registers to shift sequentially. The Scramble polynomial parameter defines if each switch in the scrambler is on or off. Specify the polynomial as a character vector, for example, '1 + z^-6 + z^-8'. Alternatively, you can specify the polynomial by listing its coefficients in order of ascending powers of z-1, where p(z-1) = 1 + p1z-1 + p2z-2+..., or by listing the powers of z that appear in the polynomial with a coefficient of 1. For example p = [1 0 0 0 0 0 1 0 1] and p = [0 -6 -8] both represent the polynomial p(z-1) = 1 + z-6 + z-8.

The Initial states parameter lists the states of the scrambler's registers when the simulation starts. The elements of this vector must be integers between 0 and N-1. The vector length of this parameter must equal the order of the scramble polynomial. (If the Scramble polynomial parameter is a vector that lists the coefficients in order, then the order of the scramble polynomial is one less than the vector length). There is an optional port that can be used to reset the scrambler.

Alternatively, the initial states can be provided by an input port when Initial states source parameter is set to Input port.

This block can accept input sequences that vary in length during simulation. For more information about sequences that vary in length, or variable-size signals, see Variable-Size Signal Basics in the Simulink® documentation.


Calculation base

The calculation base N. The input and output of this block are integers in the range [0, N-1].

Scramble polynomial

A polynomial that defines the connections in the scrambler.

Initial states source

A drop down menu that controls the source of the initial states. Select either Dialog Parameter or Input port. The default value is Dialog Parameter.

Initial states

The states of the scrambler's registers when the simulation starts. This parameter is available when Initial states source is set to Dialog Parameter.

Reset on nonzero input via port

A check box that creates a reset port. When checked, the scrambler is reset if a nonzero input is applied to the port. This control is available when Initial states source is set to Dialog Parameter. The default is that the box is not checked.

Pair Block


Introduced before R2006a

Was this topic helpful?