Reed Solomon encoding

4 views (last 30 days)
Ling
Ling on 10 Mar 2011
Commented: Akira Agata on 17 Apr 2023
This is the RS encoding I found online:
RSdata = reshape(x,8,length(x)/8);
RSdata = bi2de(RSdata.','left-msb');
RSdata = [RSdata.' 0];
msg = gf(RSdata,m);
codeRS = rsenc(msg,n,k);
out = codeRS.x ;
RSdata_out=double(out);
RSdata_out=[RSdata_out(end-d+1:end) RSdata_out(1:end-d)];
RSdata_out=de2bi(RSdata_out,'left-msb');
RSdata_out=reshape(RSdata_out.',length(RSdata_out)*8,1);
The x represents the random data generated. I need this RS encoding in the simulation of wimax physical layer. As defined in IEEE, for a 16-QAM modulation, the [n,k] RS encoding has a value of n = 64 and k = 48. I try this code and it works well only if the input bits is of a matrix [47*8 1]. I change the input bits and this is the error message I got :
Error using ==> rsenc at 82
MSG must be either a K-element row vector or a matrix with K columns.
Error in ==> RS16QAM at 25
codeRS = rsenc(msg,n,k);
I can't figure out what's the relation between the input size and the rs encoding thing. Anyone encounter the same error message before or has any idea about this? Thank you very much in advance! =)
  2 Comments
Furkan DURUKAN
Furkan DURUKAN on 16 Jul 2019
Have you solved this question?
I'm having the same problem.
Akira Agata
Akira Agata on 17 Apr 2023
If you have the Communications Toolbox, you can utilize rsenc / rsdec for Reed-Solomon encoder / decoder.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!