%% Generate Non-HT Waveform with Specified Transmission Time
% Create a wlanNonHTConfig object, 'cfgPHY', and specify the transmission time, 'txTime', in microseconds.

cfgPHY = wlanNonHTConfig;
txTime = 300;

% Calculate the PSDU length in octets.

psduLength = wlanPSDULength(cfgPHY,'TxTime',txTime)

% Set the number of bytes carried in the user payload for the configuration object, 'cfgPHY' to this PSDU length. Create a random PSDU, 'psdu', using 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.