Reed-Solomon encoder

`code = rsenc(msg,n,k)`

code = rsenc(msg,n,k,genpoly)

code = rsenc(...,* paritypos*)

`code = rsenc(msg,n,k)`

encodes
the message in `msg`

using an [`n`

,`k`

]
Reed-Solomon code with the narrow-sense generator polynomial. `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. `n`

is
at most 2^{m}-1. If `n`

is
not exactly 2^{m}-1, `rsenc`

uses
a shortened Reed-Solomon code. Parity symbols are at the end of each
word in the output Galois array `code`

.

`code = rsenc(msg,n,k,genpoly)`

is
the same as the syntax above, except that a nonempty value of `genpoly`

specifies
the generator polynomial for the code. In this case, `genpoly`

is
a Galois row vector that lists the coefficients, in order of descending
powers, of the generator polynomial. The generator polynomial must
have degree `n-k`

. To use the default narrow-sense
generator polynomial, set `genpoly`

to `[]`

.

`code = rsenc(...,`

specifies
whether * paritypos*)

`rsenc`

appends or prepends the parity symbols
to the input message to form `code`

. `paritypos`

`'end'`

`'beginning'`

`'end'`

`n`

and `k`

must differ by
an integer. `n`

between 7 and 65535.

Was this topic helpful?