Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
chin said:Hi all .
Can any one upload Reed solomon Code(matlab code with explantion) for encoder and decoder.
thanks in advance
chin
mar_deepmode said:chin said:Hi all .
Can any one upload Reed solomon Code(matlab code with explantion) for encoder and decoder.
thanks in advance
chin
Do you continue to need the RS code and in MATLAB?
Because the ones that are posted here are in C.. so if you still need it quote this msg and I'll post it here and explain it.
Cheers,
chin said:Hi mar_deepmode
Please Send me the required document...waiting for your reply
Thanking you
Chin
chin said:Continuing the same Question,
In B.Sklar book (page 450, Section 8.1.5 ), it has been mentioned that for (7,3) code , the generator polynomial is G(X) = alpha^3 + alpha^1.X +alpha^0.X^2 +alpha^3.X^3+X^4
But By using matlab am getting
rsgenpoly(7,3)
ans = GF(2^3) array. Primitive polynomial = D^3+D+1 (11 decimal)
Array elements =
1 3 1 2 3
Please help me out in this regard
Thanks in advance.
chin
Kesselring said:i don't have enough pts to download the matlab code, can anyone send me one for free? Thanks
Kesselring said:i don't have enough pts to download the matlab code, can anyone send me one for free? Thanks
% Reed-Solomon coding based on the test vectors presented in
% IEEE Std 802.16-2004
%% Input vector x and output vector z taken from Sect. 8.3.3.5.1, p444
x = ['D4';'BA';'A1';'12';'F2';'74';'96';'30'; ...
'27';'D4';'88';'9C';'96';'E3';'A9';'52'; ...
'B3';'15';'AB';'FD';'92';'53';'07';'32'; ...
'C0';'62';'48';'F0';'19';'22';'E0';'91'; ...
'62';'1A';'C1'];
z = ['49';'31';'40';'BF';'D4';'BA';'A1';'12'; ...
'F2';'74';'96';'30';'27';'D4';'88';'9C'; ...
'96';'E3';'A9';'52';'B3';'15';'AB';'FD'; ...
'92';'53';'07';'32';'C0';'62';'48';'F0'; ...
'19';'22';'E0';'91';'62';'1A';'C1';'00'];
x = hex2dec(x)'; % This is the input data from the standard
z = hex2dec(z)'; % This how the output data should be
% Note that the parity bytes are first four bytes in the vector z, namely
% '49';'31';'40';'BF' (hex).
%% Define Reed-Solomon coding parameters
m = 8; % Number of bits per symbol
n = 2^m-1; % Length of encoded data (255 for m=8)
k = 239; % Required length of source data (ie RS(255,239) )
t= (n-k)/2;
%% Define the field generator primitive polynomial (D^8+D^4+D^3+D^2+1)
% in decimal form according to eqn.(67), p432.
p = 285;
%% Form the msg vector from the input data. If the input data is shorter
% than required, prefix it with zeros.
Nzeros = k-length(x)-1; % Calculate how much zero padding to add.
xk=[zeros(1,Nzeros) x 0]; % Make source data. Prefix with zero pads if needed.
%% Creat Galois array from the source data
msg=gf(xk, m, p);
% Calculate the code generator polynomial according to eqn.(66) on p432
% of the standard (note that the 4th argument is 0 in the function call)
% Expanding eqn.(66) gives the following polynomial coefficients:
% 1 59 13 104 189 68 209 30 8 163 65 41 229 98 50 36 59
gen=rsgenpoly(n, k, p, 0);
%% Encode the message
code = rsenc(msg,n,k,gen);
% Note that Octave does not appear to place the parity bytes where expected so some
% sorting is required.
code_new = [code(k+1:k+(t/2)) code(Nzeros+1:k)];