%% Create S1G Configuration Object
% This example shows how to create S1G 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 S1G configuration object and view the default settings.

s1g = wlanS1GConfig

% Modify the defaults to specify an 8 MHz channel bandwidth, three transmit antennas, and three space-time streams.

s1g.ChannelBandwidth = 'CBW8';
s1g.NumTransmitAntennas = 3;
s1g.NumSpaceTimeStreams = 3

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

s1g2 = wlanS1GConfig('MCS',5,'NumTransmitAntennas',2)

% As currently configured, this object is not a valid S1G 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.

s1g2.NumSpaceTimeStreams = 2

% Copyright 2012 The MathWorks, Inc.