%% Generate VHT-Data Waveform
% Generate the waveform for a MIMO 20 MHz VHT-Data field.
% Create a VHT configuration object. Assign a 20 MHz channel bandwidth, two transmit antennas, two space-time streams, and set MCS to four.

cfgVHT = wlanVHTConfig('ChannelBandwidth','CBW20','NumTransmitAntennas',2,'NumSpaceTimeStreams',2,'MCS',4);

%
% Generate the user payload data and the VHT-Data field waveform.

psdu = randi([0 1],cfgVHT.PSDULength*8,1);
y = wlanVHTData(psdu,cfgVHT);
size(y)

%
% The 20 MHz waveform is an array with two columns, corresponding to two transmit antennas. There are 2160 complex samples in each column.

y(1:10,:)

% Copyright 2012 The MathWorks, Inc.