Documentation Center 
The IntegerOutput RS Decoder block recovers a message vector from a ReedSolomon codeword vector. For proper decoding, the parameter values in this block should match those in the corresponding IntegerInput RS Encoder block.
The ReedSolomon code has message length, K, and codeword length, (N  number of punctures). You specify both N and K directly in the block dialog. The symbols for the code are integers between 0 and 2^{M}1, which represent elements of the finite field GF(2^{M}). Restrictions on M and N are described in Restrictions on M and the Codeword Length N below.
This block can output shortened codewords when N and K are appropriately specified. To specify output codewords that are shortened by a length S, N and K must be specified in the dialog box as N_{full} – S and K_{full} – S, where N_{full} and K_{full} are the N and K of an unshortened code. If , the encoder can automatically determine the value of N_{full} and K_{full}. However, if , Primitive polynomial must be specified in order to properly define the extension field for the code.
The input and output are integervalued signals that represent codewords and messages, respectively. This block accepts a column vector input signal with a length that is an integer multiple of (N  number of punctures). The output signal is a column vector with a length that is the same integer multiple of K. The block inherits the output data type from the input data type. For information about the data types each block port supports, see the Supported Data Type table on this page.
For more information on representing data for ReedSolomon codes, see the section Integer Format (ReedSolomon Only) in the Communications System Toolbox™ User's Guide.
If the decoder is processing multiple codewords per frame, then the same puncture pattern holds for all codewords.
The default value of M is ceil(log2(N+1)), that is, the smallest integer greater than or equal to log2(N+1). You can change the value of M from the default by specifying the primitive polynomial for GF(2^{M}), as described in Specifying the Primitive Polynomial below. If N is less than 2^{M}1, the block uses a shortened ReedSolomon code.
You can also specify the generator polynomial for the ReedSolomon code, as described in Specifying the Generator Polynomial.
An (N, K) ReedSolomon code can correct up to floor((NK)/2) symbol errors (not bit errors) in each codeword.
The second output is the number of errors detected during decoding of the codeword. A 1 indicates that the block detected more errors than it could correct using the coding scheme. An (N,K) ReedSolomon code can correct up to floor((NK)/2) symbol errors (not bit errors) in each codeword. The data type of this output is also inherited from the input signal.
You can disable the second output by deselecting Output number of corrected errors. This removes the block's second output port.
In the case of a decoder failure, the message portion of the decoder input is returned unchanged as the decoder output.
The sample times of the input and output signals are equal.
This block supports puncturing when you select the Punctured code parameter. This selection enables the Puncture vector parameter, which takes in a binary vector to specify the puncturing pattern. For a puncture vector, 1 represents that the data symbol passes unaltered, and 0 represents that the data symbol gets punctured, or removed, from the data stream. This convention is carried for both the encoder and the decoder. For more information, see Shortening, Puncturing, and Erasures.
The codeword length.
The message length.
Selecting this check box enables the field Primitive polynomial.
This parameter applies only when you select Specify primitive polynomial.
Binary row vector representing the primitive polynomial in descending order of powers.
Selecting this check box enables the field Generator polynomial.
Integer row vector, whose entries are in the range from 0 to 2^{M}1, representing the generator polynomial in descending order of powers. Each coefficient is an element of the Galois field defined by the primitive polynomial.
This parameter applies only when you select Specify generator polynomial.
Selecting this check box enables the field Puncture vector.
A column vector of length NK. In the Puncture vector, a value of 1 represents that the data symbol passes unaltered, and 0 represents that the data symbol gets punctured, or removed, from the data stream.
The default value is [ones(2,1); zeros(2,1)].
This parameter applies only when you select Puncture code.
Selecting this check box will open the port, Era. This port accepts a binary column vector input signal with the same size as the codeword.
Erasure values of 1 represents symbols in the same position in the codeword that get erased, and values of 0 represent symbols that do not get erased.
When you select this check box, the block outputs the number of corrected errors in each word through a second output port. A decoding failure occurs when a certain word in the input contains more than (NK)/2 errors. A value of 1 indicates a decoding failure in the corresponding position in the second output vector.
This block uses the BerlekampMassey decoding algorithm. For information about this algorithm, see the references listed below.
Port  Supported Data Types 

In 

Out 

Era 

Err 

[1] Wicker, Stephen B., Error Control Systems for Digital Communication and Storage, Upper Saddle River, N.J., Prentice Hall, 1995.
[2] Berlekamp, Elwyn R., Algebraic Coding Theory, New York, McGrawHill, 1968.
[3] Clark, George C., Jr., and J. Bibb Cain, ErrorCorrection Coding for Digital Communications, New York, Plenum Press, 1981.