rs_rev.m

来自「(31,25)RS编码及解码matlab程序」· M 代码 · 共 13 行

M
13
字号
% a function to get  the reciprocal of the input 'a'
%  input a is 'a' decimal number range from 1 to 31 corresponding to numbers of GF(2^5)
% output y is 'a' decimal number range from 1 to 31 corresponding to a number of GF(2^5)
% through the rs_rev operation, can realize the division in field GF(2^5)

function y=rs_rev(a)
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];
% check the table, represent a as a power of primitive root
% reduce the power from 31, get result of the reciprocal of a
% check the table and turn the result to a decimal number
a1=find(T==a)-1;
y1=mod((31-a1),31)+1;
y=T(y1);

⌨️ 快捷键说明

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