MATLAB Examples

Create HT Configuration Object

This example shows how to create HT 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 an HT configuration object and view the default settings.

ht = wlanHTConfig
ht = 

  wlanHTConfig with properties:

       ChannelBandwidth: 'CBW20'
    NumTransmitAntennas: 1
    NumSpaceTimeStreams: 1
         SpatialMapping: 'Direct'
                    MCS: 0
          GuardInterval: 'Long'
          ChannelCoding: 'BCC'
             PSDULength: 1024
         AggregatedMPDU: 0
     RecommendSmoothing: 1

Modify the defaults to specify three transmit antennas and two space-time streams.

ht.NumTransmitAntennas = 3;
ht.NumSpaceTimeStreams = 2
ht = 

  wlanHTConfig with properties:

       ChannelBandwidth: 'CBW20'
    NumTransmitAntennas: 3
    NumSpaceTimeStreams: 2
    NumExtensionStreams: 0
         SpatialMapping: 'Direct'
                    MCS: 0
          GuardInterval: 'Long'
          ChannelCoding: 'BCC'
             PSDULength: 1024
         AggregatedMPDU: 0
     RecommendSmoothing: 1

As the settings of the object are modified, the set of properties that apply for the current configuration are shown. When the number of transmit antennas is more than the number of space-time streams, the number of extension streams property applies and is shown. Also, as currently configured, this object is not a valid HT configuration because the default 'Direct' spatial mapping requires the number of space-time streams to equal the number of transmit antennas. Validation of the object occurs when it is input to a calling function.

Create Object and Override Default Property Values

Create an HT configuration object. Use Name,Value pairs to define a sounding packet by specifying PSDULength = 0, and set the number of transmit antennas and space-time streams to 3.

ht2 = wlanHTConfig('PSDULength',0,'NumTransmitAntennas',3,'NumSpaceTimeStreams',3)
ht2 = 

  wlanHTConfig with properties:

       ChannelBandwidth: 'CBW20'
    NumTransmitAntennas: 3
    NumSpaceTimeStreams: 3
         SpatialMapping: 'Direct'
                    MCS: 0
          GuardInterval: 'Long'
          ChannelCoding: 'BCC'
             PSDULength: 0
         AggregatedMPDU: 0
     RecommendSmoothing: 1