%% Decode NB-IoT UL-SCH UCI Codeword
% Generate a codeword by applying UCI encoding to a control information bit. Recover the control information by decoding.
% Create a control information bit for encoding.

trBlkIn = 1;

% Generate the UL-SCH codeword.

cw = lteNULSCH(trBlkIn);

% Recover the transport block by decoding the NB-IoT UL-SCH codeword.

[trBlkOut,blkCRC,stateOut] = lteNULSCHDecode(cw);

% Confirm that the recovered bit matches the input control information bit.

disp(isequal(trBlkIn,trBlkOut))

% Copyright 2019 The MathWorks, Inc.