www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/DisplayMCSInformationfromHTSIGExample.m

    %% Display MCS Information from HT-SIG  
% Generate an HT-SIG waveform and display the MCS information. Change the
% MCS and display the updated information.   

%% 
% Create a |wlanHTConfig| object having two spatial streams and two
% transmit antennas. Specify an MCS value of 8, corresponding to BPSK
% modulation and a coding rate of 1/2.
cfg = wlanHTConfig('NumSpaceTimeStreams',2,'NumTransmitAntennas',2,'MCS',8);  

%% 
% Generate the information bits from the HT-SIG waveform. 
[~,sigBits] = wlanHTSIG(cfg);  

%% 
% Extract the MCS field from |sigBits| and convert it to its decimal equivalent.
% The MCS information is contained in bits 1-7. 
% 
 mcsBits = sigBits(1:7);
 bi2de(mcsBits') 
%%
% The MCS matches the specified value.  

%% 
% Change the MCS to 13, which corresponds to 64-QAM modulation with a 2/3
% coding rate. Generate the HT-SIG waveform. 
cfg.MCS = 13;
[~,sigBits] = wlanHTSIG(cfg);  

%% 
% Verify that the MCS bits are the binary equivalent of 13. 
mcsBits = sigBits(1:7);
bi2de(mcsBits')