www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/RecoverNonHTDataFieldSignalusingZeroForcingAlgorithmExample.m

    %% Recover Non-HT Data Bits Using Zero-Forcing Algorithm  

%% 
% Create a non-HT configuration object having a 1024-byte PSDU length.
% 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);  

%% 
% Create a data recovery object that specifies the use of the zero-forcing
% algorithm. 
cfgRec = wlanRecoveryConfig('EqualizationMethod','ZF');  

%% 
% Recover the data and determine the number of bit errors. 
rxBits = wlanNonHTDataRecover(rxSig,ones(52,1),0.1,cfg,cfgRec);
[numerr,ber] = biterr(rxBits,txBits)