%% Desegment Code Block
% Perform code block desegmentation and discover when segmentation occurs.
% Code block segmentation occurs if the input length is greater than 6144. The input vector of length 6145 is segmented by lteCodeBlockSegment into two vectors of length 3072 and 3136.

cbs = lteCodeBlockSegment(ones(6145,1));

%
% Next, perform desegmentation and CRC removal.

[blk,err] = lteCodeBlockDesegment(cbs);
size(blk)
err

% The first output, blk, is a column vector of length 6160. The second output, err, is a column vector of zero values.
% Copyright 2012 The MathWorks, Inc.