code = rsenc(msg,n,k)
encodes the message in msg using an
[n,k] Reed-Solomon code with the narrow-sense
generator polynomial. n is the codeword length and
k is the message length. The output code is the
Reed-Solomon code.
Input message, specified as a matrix with all values greater than or equal to zero.
msg is a Galois array of
symbols having m bits each. Each k-element row
of msg represents a message word, where the leftmost symbol is the
most significant symbol.
Data Types: double
Codeword length, specified as an integer of the form
2m–1, where m is in
the range [3, 16]. n must be in the range [7, 65535].
If n is not exactly
2m-1, rsenc
uses a shortened Reed-Solomon code.
Generator polynomial coefficients in descending order, returned as a Galois row
vector. genpoly represents the coefficients of the narrow-sense
generator polynomial in order of descending powers. To use the default narrow-sense
generator polynomial, set genpoly to [].
Reed-Solomon code, returned as a matrix with all values greater than or equal to
zero. Parity symbols are at the end of each word in this output Galois array
code.