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

📄 rsencode.m

📁 该程序是RS编译码器的MATLAB仿真程序
💻 M
字号:
%*************************************************************************
%   Copyright (C) 2008 Circuit and System Lab of PKU
%
%   Created     :   2008-5
%   Author      :   houdong(houdong@pku.edu.cn)
%
%   File Name   :   RsEncode.m
%
%   Abstract    :  realize encoding the message as RS code
%                   
%   Version     :   1.0     2008-5   All Right Reserved.
%*************************************************************************
function [RsCode] = RsEncode(Msg)           % a function to encode the input sequence
r=zeros(1,5);                               % define the register

for i=1:11                                  % create the div circuit to get the output message
    r(5)=RsSymbolAdd(r(4),Msg(12-i));
    r(4)=RsSymbolAdd(r(3),RsSymbolMul(r(5),13));
    r(3)=RsSymbolAdd(r(2),RsSymbolMul(r(5),12));
    r(2)=RsSymbolAdd(r(1),RsSymbolMul(r(5),8));
    r(1)=RsSymbolMul(r(5),7);
end
RsCode=[r(1:4),Msg];

⌨️ 快捷键说明

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