%% Perform Polar Encoding
% Perform polar encoding of a random message of length K. E specifies the length of the rate-matched output which is different from the length of the encoded message enc. The length of enc is always a power of two.

K = 132;
E = 300;
msg = randi([0 1],K,1,'int8');
enc = nrPolarEncode(msg,E)

% Copyright 2018 The MathWorks, Inc.
%