Parameters for Reed-Solomon Codes

This section describes several integers related to Reed-Solomon codes and discusses how to find generator polynomials.

Allowable Values of Integer Parameters

The table below summarizes the meanings and allowable values of some positive integer quantities related to Reed-Solomon codes as supported in this toolbox. The quantities n and k are input parameters for Reed-Solomon functions in this toolbox.

SymbolMeaningValue or Range
m Number of bits per symbol Integer between 3 and 16
nNumber of symbols per codeword Integer between 3 and 2m-1
kNumber of symbols per message Positive integer less than n, such that n-k is even
t Error-correction capability of the code (n-k)/2

Generator Polynomial

The rsgenpoly function produces generator polynomials for Reed-Solomon codes. It is useful if you want to use rsenc and rsdec with a generator polynomial other than the default, or if you want to examine or manipulate a generator polynomial. rsgenpoly represents a generator polynomial using a Galois row vector that lists the polynomial's coefficients in order of descending powers of the variable. If each symbol has m bits, then the Galois row vector is in the field GF(2m). For example, the command

r = rsgenpoly(15,13)
r = GF(2^4) array. Primitive polynomial = D^4+D+1 (19 decimal)
 
Array elements = 
 
     1     6     8

finds that one generator polynomial for a [15,13] Reed-Solomon code is X2 + (A2 + A)X+ (A3), where A is a root of the default primitive polynomial for GF(16).

Algebraic Expression for Generator Polynomials.   The generator polynomials that rsgenpoly produces have the form (X - Ab)(X- Ab+1)...(X - Ab+2t-1), where b is an integer, A is a root of the primitive polynomial for the Galois field, and t is (n-k)/2. The default value of b is 1. The output from rsgenpoly is the result of multiplying the factors and collecting like powers of X. The example below checks this formula for the case of a [15,13] Reed-Solomon code, using b = 1.

n = 15;
a = gf(2,log2(n+1)); % Root of primitive polynomial
f1 = [1 a]; f2 = [1 a^2]; % Factors that form generator polynomial
f = conv(f1,f2) % Generator polynomial, same as r above.


© 1994-2005 The MathWorks, Inc.