System object: comm.BCHDecoder
Package: comm

Decode data using a BCH decoder


Y = step(H,X)
[Y,ERR] = step(H,X)
Y = step(H,X,ERASURES)


Y = step(H,X) decodes input binary codewords in X using a (CodewordLength,MessageLength) BCH decoder with the corresponding narrow-sense generator polynomial. The step method returns the estimated message in Y. This syntax applies when you set the NumCorrectedErrorsOutputPort property to false. The input X must be a numeric or logical column vector. X must have an integer multiple of (CodewordLength - number of punctures) elements. Specify the number of punctures with the PuncturePatternSource and PuncturePattern properties. Each group of (CodewordLength - number of punctures) input elements represents one codeword to be decoded. The length of the output decoded data vector, Y, is an integer multiple of the message length specified in the MessageLength property.

[Y,ERR] = step(H,X) returns the number of corrected errors in output ERR when you set the NumCorrectedErrorsOutputPort property to true. A non- negative value in the ith element of the ERR output vector denotes the number of corrected errors in the i-th input codeword. A value of -1 in the i-th element of the ERR output indicates that a decoding error occurred for the ith input codeword. A decoding error occurs when an input codeword has more errors than the error correction capability of the BCH code.

Y = step(H,X,ERASURES) uses ERASURES as the erasures pattern input when you set the ErasuresInputPort property to true. The object decodes the binary encoded data input, X, and treats as erasures the bits of the input codewords specified by the binary column vector, ERASURES. The length of ERASURES must equal the length of X, and its elements must be of data type double or logical. Values of 1 in the erasures vector correspond to erased bits in the same position of the (possibly punctured) input codewords.

    Note:   H specifies the System object™ on which to run this step method.

    The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Was this topic helpful?