crc_table_gen.m

来自「ofdm_tx_mimo_init.m MIMO_OFDM_estimation」· M 代码 · 共 22 行

M
22
字号
function CRC_Table = CRC_table_gen(CRCPolynomial)%Calculates table of polynomial remainders for CRC computation%Based on the C code example at:%http://www.packet.cc/files/CRC32-code.htmlcrc_accum = 0;for n=0:255	crc_accum = bitshift(n,24,32); %(unsigned long)(i<<24)		for m=0:7		x = bitshift(crc_accum,1,32);		if(crc_accum >= 2^31)			crc_accum = bitxor(x,CRCPolynomial);		else			crc_accum = x;		end	end	CRC_Table(n+1) = crc_accum;end

⌨️ 快捷键说明

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