genpol_bch_150507.m
来自「详细讲述纠错码的书籍」· M 代码 · 共 12 行
M
12 行
% Script to compute the generator polynomial of a binary BCH (15,5,7)
% code using the Galois field F=GF(2^4) with p(x) = x^4+x+1
%
% Copyright (c) 2006. Robert Morelos-Zaragoza. All rights reserved.
warning off all
pold = 19; % x^4+x+1 in decimal
alpha = gf(2,4,pold); % Primitive element
a = conv(minpol(alpha),minpol(alpha^3)); % a(x) = m_1(x)m_3(x)
g = conv(a,minpol(alpha^5)) % g(x) = a(x)m_5(x)
% The polynomial is displayed as a vector of coefficients arranged from
% the highest (left most) to the lowest (right most) power. Check!!!
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?