資源簡介
用MATLAB編寫的CRC32循環碼,用于以太網和wifi中,有需要的下
代碼片段和文件信息
%?G(x)=x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1?
%???????????1????2?????3??????4?????5??????6??????7????8?????9??10?11??12
%?
function?out=crc_32(msg)
g0=ones(132);
N=length(msg);
g2(1)=xor(msg(1)g0(1));
g0=circshift(g0[0-1]);
g0(3)=xor(g2(1)g0(4));
g0(6)=xor(g2(1)g0(7));
g0(7)=xor(g2(1)g0(8));
g0(9)=xor(g2(1)g0(10));
g0(11)=xor(g2(1)g0(1
評論
共有 條評論