%% Decode Non-HT MPDU
% Create a WLAN MAC frame configuration object for a QoS Data frame, and then generate the MPDU.

cfgMAC = wlanMACFrameConfig('FrameType','QoS Data');
payload = randi([0 255],1,40);
mpdu = wlanMACFrame(payload,cfgMAC,'OutputFormat','bits');

% 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.

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

% Confirm successful decoding by displaying the status.

disp(status)

% Copyright 2020 The MathWorks, Inc.