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.
msg — Input message matrix with all values greater than or equal to zero
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
n — Codeword length positive integer
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 [].
code — Reed-Solomon code matrix with all values greater than or equal to zero
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.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.