HE/WaveAdp/temp.m
2024-03-30 16:35:40 +08:00

14 lines
390 B
Matlab

cfgNonHT = wlanNonHTConfig;
txWaveform = wlanWaveformGenerator([1;0;0;1],cfgNonHT,...
'WindowTransitionTime',0);
len = 30000;
n = rand(len,1)+rand(len,1)*1i;
rxWaveform = [n;txWaveform];
% 0.001*rand(100,1)
offset = 5;
threshold = 1-10*eps;
startOffset = wlanPacketDetect(rxWaveform,...
cfgNonHT.ChannelBandwidth,offset,threshold) ;
totalOffset = offset + startOffset