Encode data using BCH encoder
The BCHEncoder
object creates a BCH code with
specified message and codeword lengths.
To encode data using a BCH coding scheme:
Define and set up your BCH encoder object. See Construction.
Call step
to create a BCH code
with message and codeword lengths specified according to the properties
of comm.BCHEncoder
. The behavior of step
is
specific to each object in the toolbox.
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 BCH encoder System
object, enc
= comm.BCHEncoderenc
, that performs
BCH encoding.
creates
a BCH encoder object, enc
= comm.BCHEncoder(N
,K
)enc
, with the CodewordLength
property
set to N
and the MessageLength
property
set to K
.
creates
a BCH encoder object, enc
= comm.BCHEncoder(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
a BCH encoder object, enc
= comm.BCHEncoder(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
a BCH encoder object, enc
= comm.BCHEncoder(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
a BCH encoder object, enc
= comm.BCHEncoder(Name
,Value
)enc
, with each specified
property set to the specified value. You can specify additional namevalue
pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).
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.

Codeword length Specify the codeword length of the BCH code as a doubleprecision positive integer scalar. The
default is 

Message length Specify the message length as a doubleprecision positive integer scalar. The values of the


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

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

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

Generator polynomial Specify the generator polynomial as a binary doubleprecision row vector, a binary Galois row
vector that represents the coefficients of the generator polynomial in order of descending
powers, or as a polynomial character
vector. The length of the generator polynomial requires a value of 

Enable generator polynomial checking Set this property to 

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

Primitive polynomial Specify the primitive polynomial of order M, that defines the finite Galois field GF(2). Use a
doubleprecision, binary row vector with the coefficients of the polynomial in order of
descending powers or as a polynomial character
vector. This property applies when you set the 

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

Puncture pattern vector Specify the pattern that the object uses to puncture the encoded data. Use a doubleprecision
binary column vector of length 
step  Encode data using a BCH encoder 
Common to All System Objects  

release  Allow System object property value changes 
[1] Clark, George C. Jr., and J. Bibb Cain, ErrorCorrection Coding for Digital Communications. New York, Plenum Press, 1981.
[2] Wicker, Stephen B., Error Control Systems for Digital Communication and Storage Upper Saddle River, NJ, Prentice Hall, 1995.
This object implements the algorithm, inputs, and outputs described in Algorithms for BCH and RS Errorsonly Decoding.
bchenc
 bchgenpoly
 comm.BCHDecoder
 comm.RSEncoder
 primpoly