%% Decode HE SU MPDU
% Create a WLAN MAC frame configuration object for an MPDU in high-efficiency single-user (HE SU) format, and then generate the MPDU.

phyFormat = 'HE-SU';
cfgMAC =  wlanMACFrameConfig('FrameFormat',phyFormat);
payload = randi([0 255],1,40);
mpdu = wlanMACFrame(payload,cfgMAC,'OutputFormat','bits');

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

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

% Confirm successful decoding by displaying the status.

disp(status)

% Copyright 2020 The MathWorks, Inc.