%% Demodulate VHT-LTF and Get OFDM Information
% Perform OFDM demodulation on the VHT-LTF, then extract the data and pilot subcarriers.
% Generate a WLAN waveform for a VHT transmission.

cfg = wlanVHTConfig;
bits = [1; 0; 0; 1];
waveform = wlanWaveformGenerator(bits,cfg);

% Obtain the field indices and extract the VHT-LTF.

ind = wlanFieldIndices(cfg);
rx = waveform(ind.VHTLTF(1):ind.VHTLTF(2),:);

% Perform OFDM demodulation on the VHT-LTF.

sym = wlanVHTLTFDemodulate(rx,cfg);

% Get the OFDM information, then extract the data and pilot subcarriers.

info = wlanVHTOFDMInfo('VHT-LTF',cfg);
data = sym(info.DataIndices,:,:);
pilots = sym(info.PilotIndices,:,:);

% Copyright 2018 The MathWorks, Inc.