Initial scrambler state or initial pseudorandom scrambler sequence for
each generated packet.

When you disable bandwidth signaling by setting the
`SignalchannelBandwidth`

property of the
`cfg`

input to `0`

(`false`

), this input represents the initial scrambler
state. In this case, this input must be an integer in the interval [1, 127],
or as the corresponding binary-valued column vector of length seven. The
default value, `93`

, is the example state in section
I.1.5.2 of [1].

When you enable bandwidth signaling by setting the
`SignalchannelBandwidth`

property of the
`cfg`

input to `1`

(`true`

), this input represents the pseudorandom
scrambler sequence described in Table 17-7 of [1]. In this case,
this input must be an integer in the interval [*min*,
*max*], or the corresponding binary-valued column
vector of length *N*_{B}. The values of
*min*, *max*, and
*N*_{B} depend on the values of the
`BandwidthOperation`

and
`ChannelBandwidth`

properties of the
`cfg`

input according to this table.

Value of
`cfg` `.` `BandwidthOperation` | Value of
`cfg` `.` `ChannelBandwidth` | Value of *min* | Value of *max* | Value of
*N*_{B} |
---|

`'Absent'` | `'CBW20'` | 1 | 31 | 5 |

`'Absent'` | `'CBW5'` ,
`'CBW10'` , `'CBW40'` ,
`'CBW80'` , or
`'CBW160'` | 0 | 31 | 5 |

`'Static'` or
`'Dynamic'` | `'CBW20'` | 1 | 15 | 4 |

`'Static'` or
`'Dynamic'` | `'CBW5'` ,
`'CBW10'` , `'CBW40'` ,
`'CBW80'` , or
`'CBW160'` | 0 | 15 | 4 |

If you do not specify this input, the function uses the
*N*_{B} most significant bits of
the default value, `93`

.

Section 17.3.5.5 of [1] specifies the
scrambling and descrambling process applied to the transmitted data. The
header and data fields that follow the scrambler initialization field
(including data padding bits) are scrambled by XORing each bit with a
length-127 periodic sequence generated by the polynomial *S(x)* =
*x*^{7} +
*x*^{4} +
1. The octets of the PSDU are placed into a bit stream, and,
within each octet, bit 0 (LSB) is first and bit 7 (MSB) is last. This figure
demonstrates the sequence generation and XOR operation.

Conversion from integer to bits uses left-MSB orientation.
For example, initializing the scrambler with decimal `1`

,
the bits map to these elements.

Element | X^{7} | X^{6} | X^{5} | X^{4} | X^{3} | X^{2} | X^{1} |
---|

Bit Value | 0 | 0 | 0 | 0 | 0 | 0 | 1 |

To generate the bit stream equivalent to a decimal, use the
`int2bit`

function. For example, for decimal
`1`

:

int2bit(1,7)'
ans =
0 0 0 0 0 0 1

**Example: **`[1; 0; 1; 1; 1; 0; 1]`

conveys the scrambler
initialization state of 93 as a binary vector.

**Data Types: **`double`

| `int8`