Encode data using Reed-Solomon encoder
The RSEncoder
object creates a Reed-Solomon
code with message and codeword lengths you specify.
To encode data using a Reed-Solomon encoding scheme:
Define and set up your Reed-Solomon encoder object. See Construction.
Call step
to encode data according
to the properties of comm.RSEncoder
. 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 encoder System object, enc
= comm.RSEncoderenc
. This object
performs Reed-Solomon (RS) encoding.
creates
an RS encoder object, enc
= comm.RSEncoder(N
,K
)enc
, with the CodewordLength
property
set to N
and the MessageLength
property
set to K
.
creates
an RS encoder object, enc
= comm.RSEncoder(N
,K
,GP
)enc
, with the CodewordLength
property
set to N
, the MessageLength
property
set to K
, and the GeneratorPolynomial
property
set to GP
.
creates
an RS encoder object, enc
= comm.RSEncoder(N
,K
,GP
,S
)enc
, 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 encoder object, enc
= comm.RSEncoder(N
,K
,GP
,S
,Name
,Value
)enc
, with the CodewordLength
property
set to N
, the MessageLength
property
set to K
, the GeneratorPolynomial
property
set to GP
, the ShortMessageLength
property
set to S
, and each specified property Name
set
to the specified Value
.
creates
an RS encoder object, enc
= comm.RSEncoder(Name
,Value
)enc
, 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 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 3 ≤ M ≤ 16. |
|
Message length Specify the message length as a double-precision 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 as a double-precision positive integer scalar
whose value must be less than or equal to |
|
Source of generator polynomial Specify the source of the generator polynomial as When you set this property to When you set |
|
Generator polynomial Specify the generator polynomial for the RS code as a double-precision integer row vector or
as a Galois row vector. The Galois row vector entries must be in the range from
The default is the result of |
|
Enable generator polynomial checking Set this property to |
|
Source of primitive polynomial Specify the source of the primitive polynomial as When you set this property to When you set this property to |
|
Primitive polynomial Specify the primitive polynomial that defines the finite field If This property applies when you set |
|
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 with a length of ( |
|
Data type of output Specify the output data type as |
step | Encode data using a Reed-Solomon encoder |
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.