MATLAB Answers

How can I use erasure information to do Reed Solomon decoding with the Communications Toolbox 4.1 (R2008a)?

12 views (last 30 days)
I am performing Reed-Solomon encoding and decoding. I have erasure information; that is, I know the location of the errors in the encoded signal. I know that the Reed Solomon decoding algorithm can correct more errors if it has the erasure information. How can I use erasure information with the RSDEC function?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This change has been incorporated into the documentation in Release 2009a (R2009a). For previous releases, read below for any additional information.
The ability to use erasure information with the RSDEC function is not available in Communications Toolbox.
To work around this limitation, you can use the FEC.RSDEC decoder object from the Communications Toolbox, instead of the RSDEC function. The following example demonstrates how this object can be used with erasure information, with m = 3, k = 5, n = 7:
%%Code parameters
n = 7; k = 5;
%%Construct encoder
coder = fec.rsenc(n,k);
%%Message to encode
msg = [0 1 2 3 4]'
%%Perform Coding
code = encode(coder,msg)
%%Construct decoder from encoder
decoder = fec.rsdec(coder);
%%Introduce 2 errors in the codeword
code(end) = 1;
code(end-1) = 0;
%%Generate a vector of erasures-- 0 marks a good symbol, 1 marks an error location
erasures = [0 0 0 0 0 1 1]';
%%Decode the code without supplying the erasures
% Note that the decoded message is incorrect, because the number
% of errors (2) exceeds the correction capability (n-k)/2 = 1
[decoded,cnumerr,ccode] = decode(decoder,code);
decoded
%%Decode the code without supplying the erasures
% Note that the decoded message is correct now
[decoded_with_erasures,cnumerr,ccode] = decode(decoder,code,erasures);
decoded_with_erasures
More details on the FEC.RSDEC object are available at the following link:
<http://www.mathworks.com/access/helpdesk/help/toolbox/comm/ref/fec.rsdec.html>
Furthermore, if you have the Communications Blockset (a Simulink block library), you can also perform Reed Solomon decoding with erasure information in the Simulink environment. Examples are provided at the following documentation link:
<http://www.mathworks.com/access/helpdesk/help/toolbox/commblks/ug/fp74297.html#brb6prx>

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!