www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/Detect80211nPacketExample.m
%% Detect 802.11n Packet % Detect a received 802.11n packet at a signal-to-noise ratio (SNR) of 20 % dB. %% % Create an HT configuration object and TGn channel object. Generate a % transmit waveform. cfgHT = wlanHTConfig; tgn = wlanTGnChannel('LargeScaleFadingEffect','None'); txWaveform = wlanWaveformGenerator([1;0;0;1],cfgHT); %% % Pass the waveform through the TGn channel with an SNR of 20 dB. Detect % the start of the packet. snr = 20; fadedSig = tgn(txWaveform); rxWaveform = awgn(fadedSig,snr,0); startOffset = wlanPacketDetect(rxWaveform,cfgHT.ChannelBandwidth) %% % The packet is detected at the first sample of the received waveform, % specifically the returned |startOffset| indicates an offset of zero % samples from the start of the received waveform.