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

📄 rs_rev.m

📁 (31,25)RS编码及解码matlab程序
💻 M
字号:
% 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -