%% BCC-Encode Two Streams
% Encode two streams of data bits by using a BCC of rate 1/2.
%
% Create the sequence of data bits.

dataBits = randi([0 1],100,1,'int8');

%
% Parse the sequence of bits as defined in IEEE® 802.11™-2012 Section 20.3.11.5 and IEEE®  802.11ac™-2013 Section 22.3.10.5.2. numES is the number of encoded streams.

numES = 2;
parsedData = reshape(dataBits,numES,[]).';

%
% BCC-encode the parsed sequence.

encodedData = wlanBCCEncode(parsedData,1/2);
size(encodedData)

% Copyright 2012 The MathWorks, Inc.