Create BCH code from binary vector data
Communications Toolbox / Error Detection and Correction / Block
The BCH Encoder block creates a BCH code with message length K and codeword length (N – number of punctures).
If the encoder is processing multiple codewords per frame, then the same puncture pattern holds for all codewords. The input and output signal lengths are listed in Input and Output Signal Length in BCH Blocks.
See Tips for information about valid N values, valid (N,K) pairs, and errorcorrecting capabilities for a given BCH code.
Data Types 

Multidimensional Signals 

VariableSize Signals 

To generate the list of valid (N
,K
) pairs along with
the corresponding values of the errorcorrection capability, run bchnumerr
(N
).
Valid values for N
= 2^{M}–1,
where M is an integer from 3 through 16. The maximum allowable
value of N
is 65,535.
This block implements the algorithm, inputs, and outputs described in Algorithms for BCH and RS Errorsonly Decoding.
[1] Clark, George C., Jr., and J. Bibb Cain. ErrorCorrection Coding for Digital Communications. New York: Plenum Press, 1981.