%% Decode MPDU in Bit Form
% Create a WLAN MAC frame configuration object for a QoS data frame, and then generate the QoS data MPDU in octet form.

txCfgMAC = wlanMACFrameConfig('FrameType','QoS Data');
mpduOctets = wlanMACFrame(randi([0 255],1,40),txCfgMAC);

% Convert the MPDU to bit form.

mpdu = reshape(de2bi(hex2dec(mpduOctets), 8)',[],1);

% Create a non-high-throughput-format (non-HT-format) configuration object with default settings.

cfgPHY = wlanNonHTConfig;

% Return the MSDUs by decoding the MPDU for the specified PHY format configuration.

[rxCfgMAC,payload,status] = wlanMPDUDecode(mpdu,cfgPHY);

% Copyright 2018 The MathWorks, Inc.