%% Generate HT Waveform with Specified Number of Data Symbols
% Create a wlanHTConfig object, 'cfgPHY', and specify the number of data symbols, 'numDataSymbols'.

cfgPHY = wlanNonHTConfig;
numDataSymbols = 200;

% Calculate the PSDU length in octets.

psduLength = wlanPSDULength(cfgPHY,'NumDataSymbols',numDataSymbols)

% Set the number of bytes carried in the user payload for the configuration object, 'cfgPHY', to this PSDU length. Create a random PSDU, 'psdu', with the calculated PSDU length.

cfgPHY.PSDULength = psduLength;
data = randi([0 1],psduLength*8,1);

% Generate a non-HT waveform using 'cfgPHY' and 'data'.

waveform = wlanWaveformGenerator(data,cfgPHY);

% Copyright 2019 The MathWorks, Inc.