%% Demodulate S1G-Data field for OFDM Symbol Offset
% Perform OFDM demodulation on the S1G-Data field for an OFDM symbol offset, specified as a fraction of the cyclic prefix length.
% Generate a WLAN waveform for an S1G transmission with the specified modulation and coding scheme (MCS).

cfg = wlanS1GConfig('MCS',7);
bits = [0; 0; 0; 1];
waveform = wlanWaveformGenerator(bits,cfg);

% Obtain the field indices and extract the S1G-Data field.

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

% Perform OFDM demodulation on the S1G-Data field, specifying an OFDM symbol offset of 0.

field = 'S1G-Data';
sym = wlanS1GDemodulate(rx,field,cfg,'OFDMSymbolOffset',0);

% Copyright 2018 The MathWorks, Inc.