%% Stream-Parse Input Bits
% Stream-parse three OFDM symbols with two encoded streams into five spatial streams.
%
% Define the input parameters. Set the number of coded bits per OFDM symbol to 3240, the number of coded bits per subcarrier per spatial stream to 6, the number of encoded streams to 2, the number of spatial streams to 5 and the number of OFDM symbols to 3.

numCBPS = 3240;
numBPSCS = 6;
numES = 2;
numSS = 5;
numSym = 3;

%
% Create a random sequence of bits.

bits = randi([0 1],numCBPS*numSym/numES,numES,'int8');

%
% Stream-parse the random bits.

parsedData = wlanStreamParse(bits,numSS,numCBPS,numBPSCS);

%
% Verify the size of the parsed bits.

size(parsedData)

% Copyright 2012 The MathWorks, Inc.