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

cfg = wlanDMGConfig('MCS','12');
bits = [0; 0; 0; 1];
waveform = wlanWaveformGenerator(bits,cfg);

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

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

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

sym = wlanDMGOFDMDemodulate(rx,'OFDMSymbolOffset',0.5);

% Copyright 2018 The MathWorks, Inc.