www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/EstimateCoarseCFONonHTWaveformExample.m
%% Coarse Estimate of CFO for Non-HT Waveform %% % Create a non-HT configuration object. nht = wlanNonHTConfig; %% % Generate a non-HT waveform. txSig = wlanWaveformGenerator([1;0;0;1],nht); %% % Create a phase and frequency offset object and introduce a 2 kHz % frequency offset. pfOffset = comm.PhaseFrequencyOffset('SampleRate',20e6,'FrequencyOffset',2000); rxSig = pfOffset(txSig); %% % Extract the L-STF. ind = wlanFieldIndices(nht,'L-STF'); rxLSTF = rxSig(ind(1):ind(2),:); %% % Estimate the frequency offset from the L-STF. freqOffsetEst = wlanCoarseCFOEstimate(rxLSTF,'CBW20')