| Communications Toolbox | ![]() |
A message for an [n,k] BCH code must be a k-column binary Galois array. The code that corresponds to that message is an n-column binary Galois array. Each row of these Galois arrays represents one word.
The example below illustrates how to represent words for a [15, 11] BCH code.
n = 15; k = 5; % Codeword length and message length msg = gf([1 0 0 1 0; 1 0 1 1 1]); % Two messages in a Galois array cbch = bchenc(msg,n,k) % Two codewords in a Galois array.
The output is
cbch = GF(2) array.
Array elements =
Columns 1 through 5
1 0 0 1 0
1 0 1 1 1
Columns 6 through 10
0 0 1 1 1
0 0 0 0 1
Columns 11 through 15
1 0 1 0 1
0 1 0 0 1
| Creating and Decoding Reed-Solomon Codes | Parameters for BCH Codes | ![]() |
© 1994-2005 The MathWorks, Inc.