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

📄 rssymbolmul.m

📁 该程序是RS编译码器的MATLAB仿真程序
💻 M
字号:
%*************************************************************************
%   Copyright (C) 2008 Circuit and System Lab of PKU
%
%   Created     :   2008-5
%   Author      :   houdong(houdong@pku.edu.cn)
%
%   File Name   :   RsSymboMul.m
%
%   Abstract    :  realize Product = LOperand * ROperand  in the GF(2^4)
%                   
%   Version     :   1.0     2008-5   All Right Reserved.
%*************************************************************************

function [Product]=RsSymbolMul(LOperand,ROperand)

T=[1,2,4,8,3,6,12,11,5,10,7,14,15,13,9];            %create a table for GF(2^4)
if LOperand*ROperand==0                             % if 'LOperand' or 'ROperand' is 0, output 'Product' is 0
    Product=0;
% by check the table, represent the decimal numbers as powers of primitive root
% so multiplication turn to addition of the power of primitive root
% then check the table again to get the result of multiplication as a
% decimal number
else 
     a1=find(T==LOperand)-1;
     b1=find(T==ROperand)-1;
     c=mod((a1+b1),15);
     Product=T(c+1);
end

⌨️ 快捷键说明

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