%% Create VHT Configuration Object
% This example shows how to create VHT configuration objects. It also shows how to change the default property settings by using dot notation or by overriding the default settings by using Name,Value pairs when creating the object.
%% Create Object and Then Modify Properties
% Create a VHT configuration object and view the default settings.

vht = wlanVHTConfig

%
% Modify the defaults to specify a 160 MHz channel bandwidth, two transmit antennas, and two space-time streams.

vht.ChannelBandwidth = 'CBW160';
vht.NumTransmitAntennas = 2;
vht.NumSpaceTimeStreams = 2

%
%% Create Object and Override Default Property Values
% Create a VHT configuration object. Use Name,Value pairs to set the MCS to 7 and to specify two transmit antennas.

vht2 = wlanVHTConfig('MCS',7,'NumTransmitAntennas',2)

%
% As currently configured, this object is not a valid VHT configuration. Validation of the object occurs when it is the input to a calling function. When spatial mapping is Direct, the number of space-time streams must equal the number of transmit antennas. Changing the number of space time streams to match the number of transmit antennas is one option to make the configuration of the object valid.

vht2.NumSpaceTimeStreams = 2

% Copyright 2012 The MathWorks, Inc.