Problem with shortened Reed-Solomon codes in MATLAB
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to use a MATLAB system object for shortened Reed-Solomon code. This is my code (MATLAB R2015a):
N = 255; % code word length
K = 239; % message length
S = 152; % short message length
gp = rsgenpoly(N,K,[],0);
Enc = comm.RSEncoder('BitInput',true, ...
'CodewordLength', N, ...
'MessageLength', K, ...
'ShortMessageLengthSource', 'Property', ...
'ShortMessageLength', S, ...
'GeneratorPolynomialSource', 'Property', ...
'GeneratorPolynomial', gp, ...
'PrimitivePolynomialSource', 'Property', ...
'PrimitivePolynomial',[1 0 0 0 1 1 1 0 1]);
input = randi([0 1], 152*8 ,1);
coded = step(Enc,input);
But it gives the following error:
Error using zeros
Size inputs must be integers.
Error in comm.RSEncoder/setupImpl (line 446)
data = zeros(outputLength, 1);
Error in test (line 52)
coded = step(Enc,input);
Does anyone know what the problem is?
UPDATE
Apparently, there is a bug in RS encoder system object of the MATLAB R2015a. The code works with later releases of MATLAB.
0 Kommentare
Antworten (1)
Shashank
am 21 Feb. 2017
This is a bug in RS encoder system object in MATLAB R2015a and it has been corrected in MATLAB R2016a. You can try the same and verify.
Regards,
Shashank
0 Kommentare
Siehe auch
Kategorien
Mehr zu Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!