checksum.m
来自「LDPC codes .Using the matlab.」· M 代码 · 共 15 行
M
15 行
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function check_sum = CheckSum(codeword, checkMatrix_H)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% @author Andreas Waadt, 13. November 2005
% @param codeword : the (received) codeword, which is checked
% checkMatrix_H : the parity check matrix of the code
% @return check_sum : the binary check sum vector
% This function calculates the checksum for a given codeword
% and a Parity-Check-Matrix H (checkMatrix_H).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
check_sum = mod( codeword*checkMatrix_H', 2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?