%% Recover Non-HT Data Bits Using Zero-Forcing Algorithm
% Create a non-HT configuration object, specifying a PSDU length of 1024 bytes. Generate the corresponding non-HT data sequence.

cfg = wlanNonHTConfig('PSDULength',1024);
txBits = randi([0 1],8*cfg.PSDULength,1);
txSig = wlanNonHTData(txBits,cfg);

% Pass the signal through an AWGN channel with a signal-to-noise ratio of 10 dB.

rxSig = awgn(txSig,10);

% Recover the data by using a zero-forcing algorithm and determine the number of bit errors.

chanEst = ones(52,1);
noiseVarEst = 0.1;
rxBits = wlanNonHTDataRecover(rxSig,chanEst,noiseVarEst,cfg,'EqualizationMethod','ZF');
[numerr,ber] = biterr(rxBits,txBits)

% Copyright 2012 The MathWorks, Inc.