Problem with shortened Reed-Solomon codes in MATLAB
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
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
답변 (1개)
  Shashank
    
 2017년 2월 21일
        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
참고 항목
카테고리
				Help Center 및 File Exchange에서 Communications Toolbox에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

