comm.HadamardCode
Generate Hadamard code
Description
The HadamardCode
object generates a Hadamard
code from a Hadamard matrix, whose rows form an orthogonal set of
codes. You can use orthogonal codes for spreading in communication
systems in which the receiver is perfectly synchronized with the transmitter.
In these systems, the despreading operation is ideal, because the
codes decorrelate completely.
To generate a Hadamard code:
Define and set up your Hadamard code object. See Construction.
Call
step
to generate a Hadamard according to the properties ofcomm.HadamardCode
. 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)
and y = obj()
perform equivalent
operations.
Construction
H = comm.HadamardCode
creates a Hadamard
code generator System object, H
. This object
generates Hadamard codes from a set of orthogonal codes.
H = comm.HadamardCode(
creates
a Hadamard 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 a numeric, integer
scalar value with a power of two. The default is |
|
Row index of Hadamard matrix Specify the row index of the Hadamard matrix as a numeric, integer scalar value in the range
When you set this property to an integer k,
the output code has exactly k zero crossings, for k =
0, |
|
Number of output samples per frame Specify the number of Hadamard code samples that the When you set this property to a value of M, the |
|
Data type of output Specify the output data type as one of |
Methods
step | Generate Hadamard code |
Examples
Algorithms
This object implements the algorithm, inputs, and outputs described on the Hadamard 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.
Extended Capabilities
Version History
Introduced in R2012a