Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding generator polynomial of Reed Solomon encoding in Matlab

77 views
Skip to first unread message

Muhammad

unread,
Oct 20, 2015, 6:37:13 PM10/20/15
to
Hello,

I want to find generator polynomial of an arbitrary Reed Solomon encoding.

Matlab's genpoly = rsgenpoly(n,k) returns the narrow-sense generator polynomial of a Reed-Solomon code with codeword length n and message length k. The codeword length n must have the form 2^m-1 for some integer m between 3 and 16.

On the other hand, Matlab's rsenc(msg,n,k) function performs Reed Solomon coding with a somewhat arbitrary value of n, i.e., the codeword length n does not need to have the form 2^m-1 for some integer m.

Let us assume that I am using the following code in my work:

m = 3 ;
msg = gf([1 6 1],m) ;
n = 5 ;
k = 3 ;
code = rsenc(msg,n,k) ;

Matlab generates following result:

code = [1 6 1 7 6]

I wonder what generator polynomial Matlab used to perform this Reed Solomon coding. Unfortunately, Matlab's rsgenpoly function does not allow me to find the generator polynomial of code length 5, which does not have the form 2^m-1 for some integer m.

Any feedback will be appreciated.

Chandresh Vora

unread,
Oct 21, 2015, 11:29:13 AM10/21/15
to
rsenc too performs RS encoding using narrow-sense generator polynomial, as
clearly mentioned in the MALTAB-help and reference page of the function.

When n is not of the form 2^m-1, as is the case in your example, rsenc uses
a shortened RS code - reference page explains this too.

To see the generator polynomial used by rsenc, just open the file - type
"edit rsenc.m" at MATLAB command prompt. You would see a call to rsgenpoly,
with the right set of parameters. You can place a breakpoint on that line
and see the generator polynomial used by rsenc.

HTH,
Chandresh

"Muhammad" <nazmul...@gmail.com> wrote in message
news:n06fmf$i8a$1...@newscl01ah.mathworks.com...

Muhammad

unread,
Oct 21, 2015, 12:39:09 PM10/21/15
to
Thanks a lot for your feedback. I appreciate it.

--

Nazmul

"Chandresh Vora" <cv...@mathworks.com> wrote in message <n08avv$qq9$1...@newscl01ah.mathworks.com>...
0 new messages