Communications Blockset | ![]() ![]() |
Buffering to Convert Scalars to Vectors
The output of the Sampled Quantizer Encode block has values tailored to the Viterbi Decoder block's expectations. However, it is not yet ready for decoding because it is a scalar, whereas the convolutional code in this example uses codewords that are vectors of length two. The Buffer block, from the DSP Blockset, converts the scalar output of the Sampled Quantizer Encode block into a length-two vector signal. The output of the Buffer block is suitable input for the Viterbi Decoder block.
The Buffer block's outputs have length two because its Output buffer size parameter is 2. The block combines its inputs over the first two sample times into a single vector output; then it combines its input over the third and fourth sample times into the subsequent single vector output, and so on.
Like the Unbuffer block, the Buffer block is a multirate block. The period of the Buffer block's output is twice as long as the period of its input. For more about how to check sample times of blocks, see Digression: Exploring Sample Times.
![]() | Mapping the Received Data | Decoding the Convolutional Code | ![]() |