Communications Toolbox    
rsdecode

Reed-Solomon decoding using the exponential format

Syntax

Description

For All Syntaxes

The encoding counterpart for this function is rsencode.

rsdecode uses the exponential format to represent elements of GF(2m). For example, an entry of 2 represents the element , where is a primitive element of GF(2m). If field is not used as an input argument, then the exponential format is relative to a root of MATLAB's default primitive polynomial for GF(2m).If field is used as an input argument, then its format and the formats in msg and code are all relative to the same primitive element of GF(2m). See Representing Elements of Galois Fields for more information about these formats.

Since GF(2m) has 2m elements, each codeword represents 2m(2m-1) bits of information. Each decoded message represents 2m*k bits of information.

For Specific Syntaxes

msg = rsdecode(code,k) decodes code using the Reed-Solomon method. k is the message length. The codeword length n must have the form 2m-1 for some integer m greater than or equal to 3. code is a matrix with n columns. Each row of code represents one codeword. Each entry of code represents an element of GF(2m) in exponential format. msg is a matrix with k columns. Each row of msg represents one message. Each entry of msg is the exponential format of an element of GF(2m).

msg = rsdecode(code,k,m) is the same as the first syntax when the matrix code has 2m-1 columns. This syntax is faster than the first.

msg = rsdecode(code,k,field) is the same as the first syntax, except that field is a matrix that lists the elements of GF(2m) in the format described in List of All Elements of a Galois Field. This syntax is faster than the first two.

[msg,err] = rsdecode(...) returns a column vector err that gives information about error correction. A nonnegative integer in err(r) indicates the number of errors corrected in the rth codeword; a negative integer indicates that there are more errors in the rth codeword than can be corrected.

[msg,err,ccode] = rsdecode(...) returns the corrected code in ccode.

Examples

The script below continues the example from the reference page for rsencode. After corrupting some symbols from the code, it tries to recover the message.

Unless one of the random integers was zero, err is the matrix [1;2], which reflects the fact that we put one error in the first row of noisycode and two errors in the second row. Since this code's error-correction capability is floor((n-k)/2), or 2, all errors are corrected in this example.

See Also
rsencode, encode, decode, rsdeco


 rsdeco rsdecof