comm.Scrambler
Scramble input signal
Description
The comm.Scrambler object applies multiplicative scrambling to input data.
This schematic shows the multiplicative scrambler operation. The adders operate modulo N, where N is the value specified by the CalculationBase property.
At each time step, the input causes the contents of the registers to shift sequentially. Using the Polynomial property, you specify the on or off state for each switch in the scrambler.
Note
To apply additive scrambling to input data, you can use the comm.PNSequence
System object™ and the xor
function. For an example, see Additive Scrambling of Input Data.
To scramble an input signal:
Create the
comm.Scrambler
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Syntax
Description
creates a scrambler
System object. This object scrambles the input data by using a linear feedback shift register
that you specify with the Polynomial property.scrambler
= comm.Scrambler
creates the scrambler object with the CalculationBase property set to
scrambler
= comm.Scrambler(base
,poly
,cond
)base
, the Polynomial property set to
poly
, and the InitialConditions property set to
cond
.
Example: comm.Scrambler(8,'1 + x^-2 + x^-3 + x^-5 + x^-7',[0 3 2 2 5 1
7])
sets the calculation base to 8
, and the scrambler polynomial
and initial conditions as specified.
sets properties using one or more name-value pairs and either of the previous syntaxes. Enclose
each property name in single quotes.scrambler
= comm.Scrambler(___,Name
,Value
)
Example: comm.Scrambler('CalculationBase',2)
Properties
Usage
Syntax
Description
scrambles the input signal. The output is the same data type and length as the input vector. scrambledOut
= scrambler(signal
)
provides an additional input with values specifying the initial conditions of the linear
feedback shift register.scrambledOut
= scrambler(signal
,initcond
)
This syntax applies when you set the InitialConditionsSource
property of the object to 'Input port'
.
provides an additional input indicating whether to reset the state of the scrambler.scrambledOut
= scrambler(signal
,reset
)
This syntax applies when you set InitialConditionsSource to
'Property'
and ResetInputPort to
true
.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2012a