%% Generate HT-Data Waveform
% Generate the waveform signal for a 40 MHz HT-mixed data field with multiple transmit antennas. Create an HT format configuration object. Specify 40 MHz channel bandwidth, two transmit antennas, and two space-time streams.

cfgHT = wlanHTConfig('ChannelBandwidth','CBW40','NumTransmitAntennas',2,'NumSpaceTimeStreams', 2,'MCS',12)

%
% Assign PSDULength bytes of random data to a bit stream and generate the HT data waveform.

PSDU =  randi([0 1],cfgHT.PSDULength*8,1);
y = wlanHTData(PSDU,cfgHT);

%
% Determine the size of the waveform.

size(y)

% The function returns a complex two-column time-domain waveform. Each column contains 2080 samples, corresponding to the HT-Data field for each transmit antenna.
% Copyright 2012 The MathWorks, Inc.