Forums

Reed-Solomon encoder in Matlab

Started by ramsay August 7, 2006
Hi,

I am trying to use the Reed-Solomon encoder in the Matlab Communications
toolbox ( command rsenc). For example if you are trying to a (7,3) R-S
encoder. When you use rsenc the inputs and outputs have are alphabets in
the respective Galois fields ( GF(8) in this example). Is there a way to
convert the input and output formats such that we can input a binary
string and get a binary string of the encoder. I know there exists a block
in the Simulink blockset for this purpose - but i don't want to use
simulink. i want the simulation entirely in matlab with the comm toolbox.


ramsay wrote:
> Hi, > > I am trying to use the Reed-Solomon encoder in the Matlab Communications > toolbox ( command rsenc). For example if you are trying to a (7,3) R-S > encoder. When you use rsenc the inputs and outputs have are alphabets in > the respective Galois fields ( GF(8) in this example). Is there a way to > convert the input and output formats such that we can input a binary > string and get a binary string of the encoder. I know there exists a block > in the Simulink blockset for this purpose - but i don't want to use > simulink. i want the simulation entirely in matlab with the comm toolbox.
Try this : binary_in=['110';'010';'101'] dec_in=bin2dec(fliplr(binary_in)) msg_in=gf(dec_in,3) msg_coded=rsenc(msg_in,7,3,rsgenpoly(7,3,[],1)) msg_coded=rsenc(msg_in',7,3,rsgenpoly(7,3,[],1)) msg_coded_dec=msg_coded.x msg_coded_bin=fliplr(dec2bin(msg_coded_dec')) Nezhate from moscow!
> >ramsay wrote: >> Hi, >> >> I am trying to use the Reed-Solomon encoder in the Matlab
Communications
>> toolbox ( command rsenc). For example if you are trying to a (7,3) R-S >> encoder. When you use rsenc the inputs and outputs have are alphabets
in
>> the respective Galois fields ( GF(8) in this example). Is there a way
to
>> convert the input and output formats such that we can input a binary >> string and get a binary string of the encoder. I know there exists a
block
>> in the Simulink blockset for this purpose - but i don't want to use >> simulink. i want the simulation entirely in matlab with the comm
toolbox.
> >Try this : >binary_in=['110';'010';'101'] >dec_in=bin2dec(fliplr(binary_in)) >msg_in=gf(dec_in,3) >msg_coded=rsenc(msg_in,7,3,rsgenpoly(7,3,[],1)) >msg_coded=rsenc(msg_in',7,3,rsgenpoly(7,3,[],1)) >msg_coded_dec=msg_coded.x >msg_coded_bin=fliplr(dec2bin(msg_coded_dec')) > >Nezhate from moscow! > >
Wow ! I like that. Thanks for the answer.
On Tuesday, August 8, 2006 1:57:25 AM UTC+5:30, ramsay wrote:
> Hi, > > I am trying to use the Reed-Solomon encoder in the Matlab Communications > toolbox ( command rsenc). For example if you are trying to a (7,3) R-S > encoder. When you use rsenc the inputs and outputs have are alphabets in > the respective Galois fields ( GF(8) in this example). Is there a way to > convert the input and output formats such that we can input a binary > string and get a binary string of the encoder. I know there exists a block > in the Simulink blockset for this purpose - but i don't want to use > simulink. i want the simulation entirely in matlab with the comm toolbox.
hi i need matlab code for rs solomon encoder without using rsenc command
On Tuesday, August 8, 2006 3:13:34 AM UTC+5:30, MN wrote:
> ramsay wrote: > > Hi, > > > > I am trying to use the Reed-Solomon encoder in the Matlab Communications > > toolbox ( command rsenc). For example if you are trying to a (7,3) R-S > > encoder. When you use rsenc the inputs and outputs have are alphabets in > > the respective Galois fields ( GF(8) in this example). Is there a way to > > convert the input and output formats such that we can input a binary > > string and get a binary string of the encoder. I know there exists a block > > in the Simulink blockset for this purpose - but i don't want to use > > simulink. i want the simulation entirely in matlab with the comm toolbox. > > Try this : > binary_in=['110';'010';'101'] > dec_in=bin2dec(fliplr(binary_in)) > msg_in=gf(dec_in,3) > msg_coded=rsenc(msg_in,7,3,rsgenpoly(7,3,[],1)) > msg_coded=rsenc(msg_in',7,3,rsgenpoly(7,3,[],1)) > msg_coded_dec=msg_coded.x > msg_coded_bin=fliplr(dec2bin(msg_coded_dec')) > > Nezhate from moscow!
i need matlab code for rs solomon encoder without using rsenc command
On 8.10.13 7:17 , priyankareddyj921@gmail.com wrote:
> On Tuesday, August 8, 2006 1:57:25 AM UTC+5:30, ramsay wrote: >> Hi, >> >> I am trying to use the Reed-Solomon encoder in the Matlab Communications >> toolbox ( command rsenc). For example if you are trying to a (7,3) R-S >> encoder. When you use rsenc the inputs and outputs have are alphabets in >> the respective Galois fields ( GF(8) in this example). Is there a way to >> convert the input and output formats such that we can input a binary >> string and get a binary string of the encoder. I know there exists a block >> in the Simulink blockset for this purpose - but i don't want to use >> simulink. i want the simulation entirely in matlab with the comm toolbox. > > hi > i need matlab code for rs solomon encoder without using rsenc command
Time to turn in homeworks in Bangalore? -- -T.