-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vitbidecoder has been changed. Now, it can decode M/N rates convolutional code. But the computing runtime increased because of the deep loop.
- Loading branch information
Showing
3 changed files
with
47 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
G = [1 1 1;1 0 1]; | ||
[N,L] = size(G); | ||
M = L-1;Ns = 2^M; | ||
for state_i = 1:Ns | ||
state_b = dec2bin(state_i-1,M)-48; | ||
for input_bit = 0:1 | ||
d_k = input_bit; | ||
a_k = rem(G(1,:)*[d_k state_b]',2); | ||
out(input_bit+1,:) = [d_k rem(G(2,:)*[a_k state_b]',2)]; | ||
state(input_bit+1,:) = [ak state_b(1:M-1)]; | ||
end | ||
nout(state_i,:) = 2*[out(1,:) out(2,:)]-1; | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters