%% Interleave and Deinterleave Non-HT Data Field
% Perform BCC interleaving and deinterleaving for the non-HT interleaving type.
%
% Define the input parameters. Set the number of coded bits per OFDM symbol per spatial stream per interleaver block to 48.

numCBPSSI = 48;

%
% Create a sequence of random bits for one OFDM symbol, one spatial stream, and one segment.

bits = randi([0 1],numCBPSSI,1);

%
% Perform BCC interleaving on the bits.

intBits = wlanBCCInterleave(bits,'Non-HT',numCBPSSI);

%
% Perform BCC deinterleaving on the interleaved bits.

out = wlanBCCDeinterleave(intBits,'Non-HT',numCBPSSI);

%
% Verify that the deinterleaved data matches the original data.

isequal(bits,out)

% Copyright 2012 The MathWorks, Inc.