Decode data using Reed-Solomon decoder
The RSDecoder
object recovers a message vector
from a Reed-Solomon 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 Reed-Solomon decoding scheme:
Define and set up your Reed-Solomon 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 Reed-Solomon (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
name-value 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 When you set this property to When you set this property to |
|
Codeword length Specify the codeword length of the RS code in symbols as a double-precision, positive, integer
scalar value. The default is For a full-length RS code, the value of this property must be 2M–1, where M is an integer such that 3M 16. |
|
Message length Specify the message length in symbols as a double-precision positive integer scalar value. The
default is |
|
Short message length source Specify the source of the shortened message as
When |
|
Shortened message length Specify the length of the shortened message in symbols as a double-precision 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 When you set this property to When you set this property to When you set this property to Property, you must specify a generator polynomial using
the |
|
Generator polynomial Specify the generator polynomial for the RS code as a double-precision integer row vector or
as a Galois field row vector whose entries are in the range from 0 to
2M–1 and represent a generator polynomial in
descending order of powers. The length of the generator polynomial must be
The default is the result of When you use this object to generate code, you must set the generator polynomial to a double-precision integer row vector. |
|
Enable generator polynomial checking Set this property to For larger codes, disabling the check accelerates processing time. As a best practice, perform
the check at least once before setting this property to |
|
Source of primitive polynomial Specify the source of the primitive polynomial as When you set this property to When you set |
|
Primitive polynomial Specify the primitive polynomial that defines the finite field |
|
Source of puncture pattern Specify the source of the puncture pattern as If you set this property to |
|
Puncture pattern vector Specify the pattern used to puncture the encoded data as a double-precision, binary column
vector of length ( |
|
Enable erasures input Set this property to The length of the erasures vector is explained in Input and Output Signal Lengths in BCH and RS System Objects. When this property is set to |
|
Enable number of corrected errors output Set this property to |
|
Data type of output Specify the output data type as |
step | Decode data using a Reed-Solomon 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 Errors-only Decoding.
[1] Clark, George C., and J. Bibb Cain. Error-Correction Coding for Digital Communications. Applications of Communications Theory. New York: Plenum Press, 1981.