function [msg, codeword] = conv_enc_ex(len)
fprintf('create generator polynomial \n');
trellis = poly2trellis([3], [5, 7])
fprintf('generate 10 random bits \n');
msg = randint(1, len, 2);
fprintf('encoding \n');
codeword = convenc(msg, trellis);
