%% Recover HT-SIG Using Zero-Forcing Equalizer
% 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);

%
% Pass the transmitted HT-SIG waveform through an AWGN channel.

awgnChan = comm.AWGNChannel('NoiseMethod','Variance',...
    'Variance',0.1);
rxSig = awgnChan(txSig);

%
% Recover the HT-SIG field assuming a perfect channel and a noise variance estimate of 0.1, specifying zero-force equalization. Verify that the received information has no bit errors.

recBits = wlanHTSIGRecover(rxSig,ones(104,1),0.1,'CBW40','EqualizationMethod','ZF');
biterr(txBits,recBits)

% Copyright 2012 The MathWorks, Inc.