%% Generate HE TB Waveform
% Configure and generate a WLAN waveform containing an HE TB uplink packet.
% Create a configuration object for a WLAN HE TB uplink transmission.

cfgHETB = wlanHETBConfig;

% Obtain the PSDU length, in bytes, from the configuration object by using the getPSDULength object function.

psduLength = getPSDULength(cfgHETB);

% Generate a PSDU of the relevant length.

psdu = randi([0 1],8*psduLength,1);

% Generate and plot the waveform.

waveform = wlanWaveformGenerator(psdu,cfgHETB);
figure;
plot(abs(waveform));
title('HE TB Waveform');
xlabel('Time (nanoseconds)');
ylabel('Amplitude');

% Copyright 2019 The MathWorks, Inc.