程序如下:
function vHat = decodeBitFlipping(rx, H, iteration)
% Hard-decision/bit flipping sum product algorithm LDPC decoder
%
% rx : Received signal vector (column vector)
% H : LDPC matrix
% iteration : Number of iteration
%
% vHat : Decoded vector (0/1)
[M,N] = size(H);
% Prior hard-decision
ci = 0.5*(sign(rx') + 1);
% Initialization
rji = zeros(M, N);
% Asscociate the ci matrix with non-zero elements of H
qij = H.*repmat(ci, M, 1);
% Iteration
for n = 1:iteration
%fprintf('Iteration : %d\n', n);
% ----- Horizontal step -----
for i = 1:M
% Find non-zeros in the column
c1 = find(H(i, :));
% Get the summation of qij\c1(k)
for k = 1:length(c1)
rji(i, c1(k)) = mod(sum(qij(i, c1)) + qij(i, c1(k)), 2); %mod求余数,统计伴随式向量是否全为0
end % for k
end % for i
% ------ Vertical step ------
for j = 1:N
% Find non-zero in the row
r1 = find(H(:, j));
% Number of 1s in a row
numOfOnes = length(find(rji(r1, j)));
for k = 1:length(r1)
% Update qij, set '1' for majority of 1s else '0', excluding r1(k)
if numOfOnes + ci(j) >= length(r1) - numOfOnes + rji(r1(k), j)
qij(r1(k), j) = 1;
else
qij(r1(k), j) = 0;
end
end % for k
% Bit decoding
if numOfOnes + ci(j) >= length(r1) - numOfOnes
vHat(j) = 1;
else
vHat(j) = 0;
end
end % for j
end % for n
我想问问垂直判决那个if语句是啥意思,是比较一个设置好的阈值吗,但是在论文上是不满足校验方程数量最多的变量节点,还有下面那个Bit decoding的if语句又是啥?是判决结果吗?
你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答
本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。
因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。