MATLAB Examples

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.

Contents

Create Object and Then Modify Properties

Create a VHT configuration object and view the default settings.

vht = wlanVHTConfig
vht = 

  wlanVHTConfig with properties:

       ChannelBandwidth: 'CBW80'
               NumUsers: 1
    NumTransmitAntennas: 1
    NumSpaceTimeStreams: 1
         SpatialMapping: 'Direct'
                   STBC: 0
                    MCS: 0
          ChannelCoding: 'BCC'
             APEPLength: 1024
          GuardInterval: 'Long'
                GroupID: 63
             PartialAID: 275

   Read-only properties:
             PSDULength: 1035

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
vht = 

  wlanVHTConfig with properties:

       ChannelBandwidth: 'CBW160'
               NumUsers: 1
    NumTransmitAntennas: 2
    NumSpaceTimeStreams: 2
         SpatialMapping: 'Direct'
                   STBC: 0
                    MCS: 0
          ChannelCoding: 'BCC'
             APEPLength: 1024
          GuardInterval: 'Long'
                GroupID: 63
             PartialAID: 275

   Read-only properties:
             PSDULength: 1050

Create Object and Overide 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)
vht2 = 

  wlanVHTConfig with properties:

       ChannelBandwidth: 'CBW80'
               NumUsers: 1
    NumTransmitAntennas: 2
    NumSpaceTimeStreams: 1
         SpatialMapping: 'Direct'
                   STBC: 0
                    MCS: 7
          ChannelCoding: 'BCC'
             APEPLength: 1024
          GuardInterval: 'Long'
                GroupID: 63
             PartialAID: 275

   Read-only properties:
             PSDULength: 1167

As currently configured, this object is not a valid VHT configuration. Validation of the object occurs when it is input to a calling function. When spatial mapping is Direct, the number of space-time streams must equal the number of transmit antennas. Change 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
vht2 = 

  wlanVHTConfig with properties:

       ChannelBandwidth: 'CBW80'
               NumUsers: 1
    NumTransmitAntennas: 2
    NumSpaceTimeStreams: 2
         SpatialMapping: 'Direct'
                   STBC: 0
                    MCS: 7
          ChannelCoding: 'BCC'
             APEPLength: 1024
          GuardInterval: 'Long'
                GroupID: 63
             PartialAID: 275

   Read-only properties:
             PSDULength: 1166