| Communications Blockset™ | ![]() |
Sequence Generators sublibrary of Comm Sources
Walsh codes are defined as a set of N codes, denoted Wj, for j = 0, 1, ... , N - 1, which have the following properties:
Wj takes on the values +1 and -1.
Wj[0] = 1 for all j.
Wj has exactly j zero crossings, for j = 0, 1, ... , N - 1.

Each code Wj is either even or odd with respect to its midpoint.
Walsh codes are defined using a Hadamard matrix of order N. The Walsh Code Generator block outputs a row of the Hadamard matrix specified by the Walsh code index, which must be an integer in the range [0, ..., N - 1]. If you set Walsh code index equal to an integer j, the output code has exactly j zero crossings, for j = 0, 1, ... , N - 1.
Note, however, that the indexing in the Walsh Code Generator block is different than the indexing in the Hadamard Code Generator block. If you set the Walsh code index in the Walsh Code Generator block and the Code index parameter in the Hadamard Code Generator block, the two blocks output different codes.

Opening this dialog box causes a running simulation to pause. See Changing Source Block Parameters in the online Simulink® documentation for details.
Integer scalar that is a power of 2 specifying the length of the output code.
Integer scalar in the range [0, 1, ... , N - 1], where N is the Code length, specifying the number of zero crossings in the output code.
A positive real scalar specifying the sample time of the output signal.
When checked, the block outputs a frame-based signal. When cleared, the block outputs a [1] unoriented scalar.
The number of samples in a frame-based output signal. This field is active only if you select the Frame-based outputs check box. If Samples per frame is greater than the Code length, the code is cyclically repeated.
The output type of the block can be specified as an int8 or double. By default, the block sets this to double.
Hadamard Code Generator, OVSF Code Generator
![]() | Viterbi Decoder | Windowed Integrator | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |