channel_bandwidth = "CBW20"; % 20MHz rxFrame1 = trace1.iq(:); rxFrame2 = trace2.iq(:); rxFrame3 = trace3.iq(:); rxFrame4 = trace4.iq(:); function beaconFrames = extractBeaconFrames(rxFrame) beaconFrames = []; searchOffset = 0; while searchOffset < length(rxFrame) [bitsData, decParams, searchOffset, res] = recoverOFDMBits(rxFrame, searchOffset); if isempty(bitsData) continue; end [cfgMAC, ~, decodeStatus] = wlanMPDUDecode(bitsData, SuppressWarnings=true); if ~decodeStatus && matches(cfgMAC.FrameType, "Beacon") disp("Beacon at " + searchOffset); beaconFrames(end + 1) = cfgMAC; end end end beaconFrames1 = extractBeaconFrames(rxFrame1);