Code covered by the BSD License
-
circuit_logic(cur_State,n,m)
Function: This defines the circuit logic for a specific convolution
-
compute_Hamm(o,r,block_st,n)
Function: Computes the Hamming Distance.
-
compute_Lp(o,r,block_st,n)
Function: Computes the Lp norm... approximate.
-
decode_1_3(r,n,mem,k,flag)
Function: This is the decoder for a generalized convolution encoder.
-
encode_1_3(m,g,n)
Function: Encodes a Rate 1/3 Convolution Code
-
find_ML_path(node,k)
Function: Computes the ML estimate by traversing the Trellis Map, looking
-
run_me.m
-
View all files
from
Convolutional Encoder/Decoder of Rate 1/N Codes
by Romeil Sandhu
MATLAB code that tests a rate 1/N Convolution Encoder and Decoder schemes via a Trellis map.
|
| encode_1_3(m,g,n) |
function c = encode_1_3(m,g,n)
%Function: Encodes a Rate 1/3 Convolution Code
%m = message to encode
%g = n generators corresponding to the n outputs
%n = 1/n Convolution Encoder -- # of generators
%First Perform Convolution of Input Message for Each Generator. This
%produces n outputs... [y{1},y{2},...,y{n}]
for i = 1:n
y{i} = mod(conv(m,g{i}),2);
end
%Initialize code word to all zeros
c = zeros(1,n*length(y{1}));
%Assemble code word from n outputs
for i = 0:n-1
c(1+i:n:end) = y{i+1};
end
|
|
Contact us at files@mathworks.com