rssymbolsub.m

来自「RS编码程序设计」· M 代码 · 共 16 行

M
16
字号

%
%   File Name   :   RsSymbolSub.m
%   Abstract    :   Function RsSymbolSub(LOperand,ROperand) returns the
%                   subtraction of two elements in GF(2.^4) Field. LOperand and
%                   ROperand are the two elements.
%                    
%   Version     :   1.0     2008-5-20
%*************************************************************************

function [Sub]=RsSymbolSub(LOperand,ROperand)

LOperand2=de2bi(LOperand,4);%convert number in digital into binary
ROperand2=de2bi(ROperand,4);%convert number in digital into binary
 result=bitxor(LOperand2,ROperand2);% addition in binary
Sub=bi2de(result); %convert number in binary into digital

⌨️ 快捷键说明

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