%% Demodulate Non-HT L-LTF and Get OFDM Information
% OFDM demodulate the L-LTF in a non-HT transmission, then extract the data and pilot subcarriers.
% Generate a WLAN waveform for a non-HT transmission.

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

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

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

% Perform OFDM demodulation on the L-LTF.

sym = wlanLLTFDemodulate(rx,cfg);

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

bandwidth = cfg.ChannelBandwidth;
info = wlanNonHTOFDMInfo('L-LTF',bandwidth);
data = sym(info.DataIndices,:,:);
pilots = sym(info.PilotIndices,:,:);

% Copyright 2018 The MathWorks, Inc.