Getting Started    

Hamming Encoder and Decoder

The Hamming Encoder block encodes the data before it is sent through the channel. The default code is the [7,4] Hamming code, which encodes message words of length 4 into code words of length 7. As a result, the block converts frames of size 4 into frames of size 7. The code can correct one error in each transmitted code word.

For an [n,k] code, the input to the Hamming Encoder block must consist of vectors of size k. In this example, k=4.

The Hamming Decoder block decodes the data after it is sent through the channel. If at most one error is created in a code word by the channel, the block decodes the word correctly. However, if more than one error occurs, the Hamming Decoder block might decode incorrectly.

To learn more about the block coding features of the Communications Blockset, see the section Block Coding in the online documentation for the Communications Blockset.


  Building the Hamming Code Model Setting Parameters in the Hamming Code Model