Skip to content
Snippets Groups Projects
Commit d9291996 authored by Sławomir Stepanowski's avatar Sławomir Stepanowski
Browse files

Update wyjscie_zdekodowane.m

parent 24897e93
Branches
No related merge requests found
......@@ -5,7 +5,6 @@ INITIAL_LEVEL = 1;
INITIAL_SHIFT_J = 0;
% Bity zamrozne przedstawione jako 1XN jako vector
Bity zamrozne przedstawione jako 1XN jako vector
frozen_bits_expanded = nan(1,BLOCKLENGTH);
frozen_bits_expanded(A_c) = frozen_bits;
......@@ -15,11 +14,10 @@ LRs = nan(BLOCKLENGTH, log2(BLOCKLENGTH)+1);
wyjscie_zdekodowane = nan(1, BLOCKLENGTH);
for j = 1:BLOCKLENGTH
if(A_c(j))
% If the bit is frozen, we don't need to compute anything
% sprawdzenie czy bit zamrozony
wyjscie_zdekodowane(j) = frozen_bits_expanded(j);
else
% To decode, first compute the likelihood ratio using the previously
% decoded bits
[LRs, L] = compute_lr(received_output, wyjscie_zdekodowane(1:j-1), ...
BLOCKLENGTH, j, LRs, INITIAL_SHIFT_J, INITIAL_LEVEL);
......@@ -39,17 +37,7 @@ wyjscie_zdekodowane = wyjscie_zdekodowane(A);
end
% Compute the likelihood ration using channels outputs and decoded bits.
% See Arikan formula 74 and 75
%
% We complete the table LRs to avoid recomputing the same likelihood ratio.
%
% level indicates the recursion level (1 for decision level, log2(N)+1 for
% channel level).
%
% shift_j allows to compute quickly where the local j is in the LRs table
% (abs_j = j + shift_j).
%
% For convenience, return L := LRs(j)
%
% INPUT
......@@ -91,7 +79,6 @@ if(N == 1)
return;
end
% % Use formula 74 or 75 according to the parity of j
% First compute the recursive likelihood ratio (same are used)
if(mod(j,2)==1)
j_even = j+1;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment