资源简介
已经编译通过~
CRC算法原理与实现代码
产品简介:CRC算法原理与实现代码
产品详细介绍:
CRC 代数学的一般性算法
在代数编码理论中,将一个码组表示为一个多项式,码组中各码元当作多项式的系数。

代码片段和文件信息
function [ output ] = crc_add( input crc_no )
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% written by Wang Meifang on 24th April 2008
% Email: mflltt@126.com
% the function is proposed for adding crc bits to the input sequence
% input: the input information bits a column vector
% crc_no: the number of the adding crc bits such as 38121624
% output: the output information+crc bits a column vector
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the length of input
k = size(input2);
generator = zeros(1crc_no+1);
output = zeros(1k+crc_no);
switch crc_no
case 3
generator = [1 0 1 1];
case 8
generator = [1 1 0 0 1 1 0 1 1]; %D^8+D^7+D^4+D^3+D+1
case 12
generator = [1 1 0 0 0 0 0 0 0 1 1 1 1]; %D^12+D^11+D^3+D^2+D+1
case 16
generator = [1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1]; %D^16+D^12+D^5+1
case 24
generator = [1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1]; %D^24+D^23+d^6+D^5+D+1
otherwise
fprintf(‘\nPlease the number of crc bits should be 8 12 16 24\n‘);
end
output(1:k)=input;
for ii = 1:k
if(output(1) == 1)
output(1:crc_no+1) = mod((output(1:crc_no+1)+generator)2);
end
output = [output(2:end) output(1)];
end
output = [input output(1:crc_no)];
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1286 2008-04-24 13:14 CRC\crc_add.m
文件 1429 2008-04-24 13:14 CRC\crc_check.m
文件 1524 2007-04-11 10:38 CRC\CRC算法原理与实现代码-c.txt
文件 232 2008-04-24 13:14 CRC\test.m
目录 0 2008-04-24 13:14 CRC
----------- --------- ---------- ----- ----
4471 5
相关资源
- CRC循环冗余校验的matlab仿真程序
- RGB 、YUV、YIQ 和 YCrCb颜色空间转换的
- matlab海明编码,crc校验 带gui
- MATLAB Simulations for Radar Systems Design (
- MATLAB CRC校验码计算
- CRC编码解码 matlab仿真
- CRC校验 海明编码
- matlab实现CRC编码
-
CRC码的Simuli
nk仿真实验 - matlab进行CRC编解码
- CRC32的FPGA并行实现原理及MATLAB仿真
- hexbin 转换,合并,添加CRC
- CRC32 MATLAB代码
- CRC32的matlab代码
- crc32的matlab程序
- Matlab CRC校验GUI
- crc16 CCITT crc-16的编码
- CRC校验MATLAB代码
- CRC_polar_SC_SCL polar码编译码
- CRC_polar_SC_SCL polar码的SC译码算法
- CRC冗余校验码的Matlab仿真实现实验报
评论
共有 条评论