Representing Words for Reed-Solomon Codes

This toolbox supports Reed-Solomon codes that use m-bit symbols instead of bits. A message for an [n,k] Reed-Solomon code must be a k-column Galois array in the field GF(2m). Each array entry must be an integer between 0 and 2m-1. The code corresponding to that message is an n-column Galois array in GF(2m). The codeword length n must be between 3 and 2m-1.

The example below illustrates how to represent words for a [7,3] Reed-Solomon code.

n = 7; k = 3; % Codeword length and message length
m = 3; % Number of bits in each symbol
msg = gf([1 6 4; 0 4 3],m); % Message is a Galois array.
c = rsenc(msg,n,k) % Code will be a Galois array.

The output is

c = GF(2^3) array. Primitive polynomial = D^3+D+1 (11 decimal)
 
Array elements = 
 
     1     6     4     4     3     6     3
     0     4     3     3     7     4     7


© 1994-2005 The MathWorks, Inc.