I am trying to understand the algorithms of channel coding. Regarding the conventional channel which is, for me, the easiest one to implement, I have a question regarding the output of its decoder.
When using encoder whose rate is 1/2, the output of the decoder is half of its input, for example:
constlen = 7; codegen = [171 133];
tblen = 32; % traceback length
trellis = poly2trellis(constlen, codegen);
X = randi([0 1], 1024,1); %The data to encdoe
Y = convenc(X, trellis); %Performing of coding
Y_dec = vitdec(Y, trellis, tblen, 'cont', 'hard'); %The decoder
As you see, in last line, Y_dec is of length 1024. However, its input Y has a length of 2048. What I need is to show the whole corrected outputs, I mean I need to have the output Y_dec of length 2048 which includes the data and the redundancy. Is that feasible?
EDIT:
Following Dilip's feedback, I could get back it as below:
constlen = 7; codegen = [171 133];
tblen = 32; % traceback length
trellis = poly2trellis(constlen, codegen);
X = randi([0 1], 1024,1); %The data to encdoe
Y = convenc(X, trellis); %Performing of coding
Y_dec = vitdec(Y, trellis, tblen, 'cont', 'hard'); %The decoder
Y2 = convenc(Y_dec(1+tblen:end), trellis);
Y3 = Y(1:end-2*tblen) - Y2; % This is Zero
But as you see, it means that a part of code word can be found which is Y2 = Y(1:end-2*tblen). however the code word size is $2048$, so is there a way to get all the codeword?