Conventional channel coding/decoding 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?
Yes, it is possible to determine the path that the Viterbi algorithm found through the trellis. Just apply the encoding algorithm to what you are calling Y_dec and you will get the corresponding codeword of length $2048$. You can then compare it to Y, the transmitted codeword, to see where the channel made errors.
Additional notes:
If the data to be transmitted 1024 information bits and the code to be used is a half-rate $(2,1)$ convolutional code with constraint length $7$, then the convolutional codeword produced by the convolutional encoder is $2060 = 2048+12 = (2\times 1024) + 2\times 6$ bits long where the extra $12$ bits are produced by the encoder as zeroes are pumped into the $6$-bit-long data buffer as the buffer empties out. I don't speak MATLABian gobbledygook at all and so don't know what Y_dec(1+tblen:end) means, or indeed why tblen is involved at all.  If  Y = convenc(X, trellis) produces a codeword vector Y of 2060 bits, then
Y_dec = vitdec(Y, trellis, tblen, 'cont', 'hard') should produce X again. I don't see where there was any noise involved and so the Viterbi decoder should just zoom through the trellis following the same path as the encoder so that Y_dec should equal X. If there is noise, then Y_dec should be the same as X in most of the 1024 bits except for some bursts of errors in that span. In this case, convenc(Y_dec, trellis) will not be the same as Y, but in the absence of any channel errors, Y_dec=X and  convenc(Y_dec, trellis)=convenc(X, trellis)=Y.