Generate Gold sequence
The GoldSequence
object generates a Gold sequence.
Gold sequences form a large class of sequences that have good periodic
crosscorrelation properties.
To generate a Gold sequence:
Define and set up your Gold sequence object. See Construction.
Call step
to generate the Gold
sequence according to the properties of comm.GoldSequence
.
The behavior of step
is specific to each object in
the toolbox.
Note
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System object™, you can
call the object with arguments, as if it were a function. For example, y
= step(obj)
and y = obj()
perform equivalent
operations.
H = comm.GoldSequence
creates a Gold sequence
generator System object, H
. This object generates
a pseudorandom Gold sequence.
H = comm.GoldSequence(
creates
a Gold sequence generator object, Name
,Value
)H
, with each
specified property set to the specified value. You can specify additional
namevalue pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).

Generator polynomial for first preferred PN sequence Specify the polynomial that determines the feedback connections for the shift register of the
first preferred PN sequence generator. The default is 

Initial conditions for first PN sequence generator Specify the initial conditions for the shift register of the first preferred PN sequence
generator. The default is 

Generator polynomial for second preferred PN sequence Specify the polynomial that determines the feedback connections for the shift register of the
second preferred PN sequence generator. The default is 

Source of initial conditions for second PN sequence Specify the source of the initial conditions that determines the start of the second PN
sequence as one of 

Initial conditions for second PN sequence generator Specify the initial conditions for the shift register of the second preferred PN sequence
generator as a numeric, binary scalar, or as a numeric, binary vector. The
length must equal the degree of the second generator polynomial. You set the
second generator polynomial in the When you set this property to a vector, each element of the
vector corresponds to the initial value of the corresponding cell
in the shift register. The default is When you set this property to a scalar, the initial conditions of all shift register cells are the specified scalar value. 

Index of output sequence of interest Specify the index of the output sequence of interest from the set of available sequences as a
scalar integer. The default is The index values The set G(u, v) of available Gold
sequences is defined by G(u,v)
= {u, v,
(u 

Sequence offset from initial time Specify the offset of the Gold sequence from its starting point as a numeric, integer scalar
value that can be positive or negative. The default is 

Enable variablesize outputs Set this property to true to enable an additional input to the
step method. The default is false. When you set this property to true,
the enabled input specifies the output size of the Gold sequence used
for the step. The input value must be less than or equal to the value
of the When you set this property to false, the 

Maximum output size Specify the maximum output size of the Gold sequence as a positive integer 2element row vector. The second element of the vector must be 1. The default is [10 1]. This property applies when you set the 

Number of output samples per frame Specify the number of Gold sequence samples that the 

Enable generator reset input Set this property to 

Data type of output Specify the output data type as one of You must have a FixedPoint Designer™ user license to use this
property in 
step  Generate a Gold sequence 
This object implements the algorithm, inputs, and outputs described on the Gold Sequence Generator block reference page. The object properties correspond to the block parameters.