comm.OVSFCode
Generate OVSF code
Description
The 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:
Define and set up your OVSF code object. See Construction.
Call
step
to generate an OVSF code according to the properties ofcomm.OVSFCode
. The behavior ofstep
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,x)
and y = obj(x)
perform
equivalent operations.
Construction
H = comm.OVSFCode
creates an orthogonal
variable spreading factor (OVSF) code generator System object, H
.
This object generates an OVSF code.
H = comm.OVSFCode(
creates
an OVSF code generator object, Name
,Value
)H
, with each specified
property set to the specified value. You can specify additional name-value
pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).
Properties
|
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 |
Methods
step | Generate OVSF code |
Examples
Generate 10 samples of an OVSF code with a spreading factor of 64.
hOVSF = comm.OVSFCode('SamplesPerFrame', 10,'SpreadingFactor',64); seq = step(hOVSF)
Algorithms
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.
Version History
Introduced in R2012a