Generate OVSF code
OVSFCode object generates an orthogonal
variable spreading factor (OVSF) code from a set of orthogonal codes.
OVSF codes were first introduced for 3G communication systems. They
are primarily used to preserve orthogonality between different channels
in a communication system.
To generate an OVSF code:
Starting in R2016b, instead of using the
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example,
= step(obj,x) and
y = obj(x) perform
H = comm.OVSFCode creates an orthogonal
variable spreading factor (OVSF) code generator System
This object generates an OVSF code.
H = comm.OVSFCode( creates
an OVSF code generator object,
H, with each specified
property set to the specified value. You can specify additional name-value
pair arguments in any order as (
Length of generated code
Specify the length of the generated code as an integer scalar
value with a power of two. The default is
Index of code of interest
Specify the index of the desired code from the available set of codes that have the spreading
factor specified in the
OVSF codes are defined as the rows of an n-by-n matrix, Cn,
where n is the value specified in the
You can define the matrix Cn recursively as follows:
Number of output samples per frame
Specify the number of OVSF code samples that the
Data type of output
Specify output data type as one of
|reset||Reset states of OVSF code generator object|
|step||Generate OVSF code|
Generate 10 samples of an OVSF code with a spreading factor of 64.
hOVSF = comm.OVSFCode('SamplesPerFrame', 10,'SpreadingFactor',64); seq = step(hOVSF)
This object implements the algorithm, inputs, and outputs described on the OVSF Code Generator block reference page. The object properties correspond to the block parameters, except:
The object does not have a property to select frame based outputs.
The object does not have a property that corresponds to the Sample time parameter.