Communications Toolbox    
rsdeco

Reed-Solomon decoder

Syntax

Description

For All Syntaxes

The encoding counterpart for this function is rsenco.

In all cases, the codeword length n must have the form 2m-1 where m is an integer greater than or equal to 3.

The matrix code, which contains the code words to be decoded, can have one of several formats. The table below shows the formats for msg, how the optional argument format should reflect the format of msg, and how the format of the output code depends on these choices. If format is not specified as input, then its default value is binary.

Table 3-20: Information Formats for Reed-Solomon Decoding 
Format of code
Value of format Argument
Format of msg
Binary matrix with m columns
'binary'
Binary matrix with m columns
Example: code = [0 0 0; 0 1 1; 0 1 1; 1 1 0; 1 0 1; 1 0 0; 0 1 1]
Binary column vector
'binary'
Binary column vector
Example: code = [0 0 0, 0 1 1, 0 1 1, 1 1 0, 1 0 1, 1 0 0, 0 1 1]';
Matrix of integers in the range [0, 2m-1], with n columns
'decimal'
Matrix of integers in the range [0, 2m-1], with k columns
Example: code = [0, 6, 6, 3, 5, 1, 6]
Matrix of integers in the range [-1, 2m-2], with n columns
'power'
Matrix of integers in the range [-1, 2m-2], with k columns
Example: code = [-1, 5, 5, 2, 4, 0, 5]

For Specific Syntaxes

msg = rsdeco(code,n,k) decodes code using the Reed-Solomon decoding method. n is the codeword length and k is the message length. code has either of the two binary formats described in Table 3-20, Information Formats for Reed-Solomon Decoding.

msg = rsdeco(code,n,k,format) is the same as the syntax above, except that format specifies the format of code. Table 3-20, Information Formats for Reed-Solomon Decoding, lists the possible values for format, as well as the corresponding shape and contents of code.

msg = rsdeco(code,field,...) is a faster variation of the syntaxes above. field is a matrix that lists all elements of GF(2m) in the format described in List of All Elements of a Galois Field. The size of field determines n.

[msg,err] = rsdeco(...) outputs the number err, which specifies the number of errors that occurred in the decoding.

[msg,err,ccode] = rsdeco(...) outputs ccode, a corrected version of code. The format of ccode matches the format of code in the input.

[msg,err,ccode,cerr] = rsdeco(...) outputs the number cerr, which specifies the number of errors found in the ccode column.

Examples

This example creates and decodes a noisy code. Although some codewords contain errors, the decoded message contains no errors.

See Also
rsenco, rsdecode, rspoly, encode, decode


 rcosine rsdecode