%% Recover HE-SIG-A Information Bits with Channel State Information
% Recover the information bits in the HE-SIG-A field of a WLAN HE multiuser (HE-MU) waveform with specified channel state information.
% Create a WLAN HE-MU-format configuration object with default settings and use it to generate an HE-MU waveform.

cfgHE = wlanHEMUConfig(0);
cbw = cfgHE.ChannelBandwidth;
waveform = wlanWaveformGenerator(1,cfgHE);

% Obtain the WLAN field indices, which contain the modulated HE-SIG-A symbols.

ind = wlanFieldIndices(cfgHE);
rxSIGA = waveform(ind.HESIGA(1):ind.HESIGA(2),:);

% Perform OFDM demodulation to extract the HE-SIG-A field.

sigaDemod = wlanHEDemodulate(rxSIGA,'HE-SIG-A',cbw);

% Return the pre-HE OFDM information and extract the demodulated HE-SIG-A symbols.

preHEInfo = wlanHEOFDMInfo('HE-SIG-A',cbw);
siga = sigaDemod(preHEInfo.DataIndices,:);

% Specify the channel state information and assume no channel noise.

csi = ones(52,1);
noiseVarEst = 0;

% Recover the HE-SIG-A information bits and other information. Display the CRC result.

[bits,failCRC] = wlanHESIGABitRecover(siga,noiseVarEst,csi);
disp(failCRC);

% Copyright 2018 The MathWorks, Inc.