%% Generate HT Short Training Field
% Create a wlanHTConfig object with a 40 MHz bandwidth.

cfg = wlanHTConfig('ChannelBandwidth','CBW40');

%
% Generate an HT-STF. The function returns a complex output of 160 samples.

stf = wlanHTSTF(cfg);
size(stf)

%
% Change the channel bandwidth to 20 MHz and create a new HT-STF.

cfg.ChannelBandwidth = 'CBW20';
stf = wlanHTSTF(cfg);

%
% Verify that the number of samples has been halved due to the bandwidth reduction.

size(stf)

% Copyright 2012 The MathWorks, Inc.