www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/ExtractRateInformationfromLSIGExample.m
%% Extract Rate Information from L-SIG %% % Create a non-HT configuration object. The default |MCS| is 0. cfg = wlanNonHTConfig %% % Generate the L-SIG waveform and information bits. Extract the rate from % the returned bits. The rate information is contained in the first four % bits. [y,bits] = wlanLSIG(cfg); rateBits = bits(1:4) %% % As defined in IEEE Std 802.11(TM)-2012, Table 18-6, a value of |[1 1 0 % 1]| corresponds to a rate of 6 Mbps for 20 MHz channel spacing. %% % Change |MCS| to 7 then regenerate the L-SIG waveform and information % bits. Extract the rate from the returned bits and analyze. The rate % information is contained in the first four bits. cfg.MCS = 7 [y,bits] = wlanLSIG(cfg); rateBits = bits(1:4) %% % As defined in IEEE Std 802.11-2012, Table 18-6, a value of |[0 0 1 1]| % corresponds to a rate of 54 Mbps for 20 MHz channel spacing.