%% Create HE MU Object Using Binary Allocation Indexing
% Create an HE MU configuration object for a 40 MHz transmission with an allocation index of 11000000 for each 20 MHz subchannel. This configuration specifies two 242-tone RUs, each with one user.

cfgHEMU = wlanHEMUConfig(["11000000" "11000000"],'NumTransmitAntennas',2);

% Configure the first RU and the first user.

cfgHEMU.RU{1}.SpatialMapping = 'Direct';
cfgHEMU.User{1}.APEPLength = 1e3;
cfgHEMU.User{1}.MCS = 2;
cfgHEMU.User{1}.NumSpaceTimeStreams = 2;
cfgHEMU.User{1}.ChannelCoding = 'LDPC';
cfgHEMU.User{1}.NominalPacketPadding = 16;

% Configure the second RU and the second user.

cfgHEMU.RU{2}.SpatialMapping = 'Fourier';
cfgHEMU.User{2}.APEPLength = 500;
cfgHEMU.User{2}.MCS = 3;
cfgHEMU.User{2}.NumSpaceTimeStreams = 1;
cfgHEMU.User{2}.ChannelCoding = 'LDPC';
cfgHEMU.User{2}.NominalPacketPadding = 8;

% Display the configuration object properties for both RUs and both users.

disp(cfgHEMU)
cfgHEMU.RU{1:2}
cfgHEMU.User{1:2}

% Copyright 2018 The MathWorks, Inc.