Decode data using ReedSolomon decoder
The RSDecoder
object recovers a message vector
from a ReedSolomon codeword vector. For proper decoding, the property
values for this object should match the property values in the corresponding
RS Encoder object.
To decode data using a ReedSolomon decoding scheme:
Define and set up your ReedSolomon decoder object. See Construction.
Call step
to decode data according
to the properties of comm.RSDecoder
. The behavior
of step
is specific to each object in the toolbox.
Note
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System object™, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
creates
a block decoder System object, dec
= comm.RSDecoderdec
. This object
performs ReedSolomon (RS) decoding.
creates an RS decoder object, dec
= comm.RSDecoder(N
,K
)dec
with the CodewordLength
property set to N
and the MessageLength
property set to K
.
creates an RS decoder object, dec
= comm.RSDecoder(N
,K
,GP
)dec
with the CodewordLength
property set to N
, the MessageLength
property set to K
, and the GeneratorPolynomial
property set
to GP
.
creates an RS decoder object, dec
= comm.RSDecoder(N
,K
,GP
,S
)dec
with the CodewordLength
property set to N
, the MessageLength
property set to K
, the GeneratorPolynomial
property set
to GP
, and the ShortMessageLength
property set to
S
.
creates an RS decoder object, dec
= comm.RSDecoder(N
,K
,GP
,S
,Name
,Value
)dec
with the CodewordLength
property set to N
, the MessageLength
property set to K
, the GeneratorPolynomial
property set
to GP
, and each specified property Name
set to the
specified Value
.
creates
an RS decoder object, dec
= comm.RSDecoder(Name
,Value
)dec
, with each specified
property name set to the specified value. You can specify additional
namevalue pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).
Note
The input and output signal lengths are listed in Input and Output Signal Lengths in BCH and RS System Objects on
the comm.BCHDecoder
reference page.

Assume that input is bits Specify whether the input comprises bits or integers. The default
is


Codeword length Specify the codeword length of the RS code in symbols as a doubleprecision, positive, integer
scalar value. The default is For a fulllength RS code, the value of this property must be 2^{M} – 1, where M is an integer such that 3 ≤ M ≤ 16. 

Message length Specify the message length in symbols as a doubleprecision positive integer scalar value. The
default is 

Short message length source Specify the source of the shortened message as


Shortened message length Specify the length of the shortened message in symbols as a doubleprecision positive integer
scalar whose value must be less than or equal to When 

Source of generator polynomial Specify the source of the generator polynomial as


Generator polynomial Specify the generator polynomial for the RS code as a doubleprecision integer row vector or
as a Galois field row vector. The Galois field row vector entries must be in the range
[0, 2^{M} – 1] and represent a generator
polynomial in descending order of powers. Each coefficient is an element of the Galois
field When you use this object to generate code, you must set the generator polynomial to a doubleprecision integer row vector. This property applies when you set 

Enable generator polynomial checking Set this property to This check verifies that X^{CodewordLength} + 1
is divisible by the generator polynomial specified in the A valid generator polynomial is given by (X –
α^{B})×(X –
α^{(B +
1)})×...×(Xα^{(B +
CodewordLength –
MessageLength –
1)}), where α is a root of the primitive polynomial and
B is an integer. If the value of B is 1, then
you can set this property to This property applies when you set 

Source of primitive polynomial Specify the source of the primitive polynomial as


Primitive polynomial Specify the primitive polynomial that defines the finite field This property applies when you set 

Source of puncture pattern Specify the source of the puncture pattern as


Puncture pattern vector Specify the pattern used to puncture the encoded data as a doubleprecision, binary column
vector of length ( This property applies when you set 

Enable erasures input Set this property to When you set this property to 

Enable number of corrected errors output Set this property to 

Data type of output Specify the output data type as This property applies when you set 
step  Decode data using a ReedSolomon decoder 
Common to All System Objects  

release  Allow System object property value changes 
This object implements the algorithm, inputs, and outputs described in Algorithms for BCH and RS Errorsonly Decoding.
[1] Clark, George C., and J. Bibb Cain. ErrorCorrection Coding for Digital Communications. Applications of Communications Theory. New York: Plenum Press, 1981.