rs_decode_syndrome.m
来自「(31,25)RS编码及解码matlab程序」· M 代码 · 共 13 行
M
13 行
% a function to calculate the syndrome polynomial accoding to the received
% sequence 'r_x'
function synd_x=rs_decode_syndrome(r_x)
% 'G' is the generator polynomial
G=[21 24 16 24 9 10 0];
T=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18];
s=zeros(1,6);
for j=1:6
% use the function rs_poly(t,x) to calculate s(j)=r(a^j)
% all calculations are in the GF(2^5)
s(j)=rs_poly(r_x,T(j+1));
end
synd_x=[1,s];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?