⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rsdecodecalcsynd.m

📁 该程序是RS编译码器的MATLAB仿真程序
💻 M
字号:
%*************************************************************************
%   Copyright (C) 2008 Circuit and System Lab of PKU
%
%   Created     :   2008-5
%   Author      :   houdong(houdong@pku.edu.cn)
%
%   File Name   :   RsDecodeCalcSynd.m
%
%   Abstract    :   recieving the RS code and get the syndrome Polynomial
%                   
%   Version     :   1.0     2008-5   All Right Reserved.
%*************************************************************************
function [Syndrome]=RsDecodeCalcSynd(RsCodeWithNoise)
%RsCodeWithNoise为接收多项式,Syndrome为伴随多项式
T=[1,2,4,8,3,6,12,11,5,10,7,14,15,13,9];
s=zeros(1,4);
for j=1:4
% the following to calculate s(j)=r(a^j)
% all calculations are in the GF(2^4)
   TT=[1,2,4,8,3,6,12,11,5,10,7,14,15,13,9];
   xx=find(TT==T(j+1))-1;
   n=length(RsCodeWithNoise)-1;
   y1=RsCodeWithNoise(1);
   for i=1:n
      y1=RsSymbolAdd(y1,RsSymbolMul(RsCodeWithNoise(i+1),TT(mod(i*xx,15)+1)));
   end
   s(j)=y1;
end
Syndrome=s;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -