%% Recover HT-SIG Information Bits in Perfect Channel
% Create a wlanHTConfig object having a channel bandwidth of 40 MHz. Use the object to create an HT-SIG field.

cfg = wlanHTConfig('ChannelBandwidth','CBW40');
[txSig,txBits] = wlanHTSIG(cfg);

%
% Because a perfect channel is assumed, specify the channel estimate as a column vector of ones and the noise variance estimate as zero.

chEst = ones(104,1);
noiseVarEst = 0;

%
% Recover the HT-SIG information bits. Verify that the received information bits are identical to the transmitted bits.

rxBits = wlanHTSIGRecover(txSig,chEst,noiseVarEst,'CBW40');
numerr = biterr(txBits,rxBits)

% Copyright 2012 The MathWorks, Inc.