gusucode.com > wlan工具箱matlab源码程序 > wlan/wlan/wlanVHTSTF.m

    function y = wlanVHTSTF(cfgVHT)
%WLANVHTSTF VHT Short Training Field (VHT-STF)
% 
%   Y = wlanVHTSTF(CFGVHT) generates the VHT Short Training Field (VHT-STF)
%   time-domain signal for the VHT transmission format.
%
%   Y is the time-domain VHT-STF signal. It is a complex matrix of size
%   Ns-by-Nt where Ns represents the number of time-domain samples and Nt
%   represents the number of transmit antennas.
%
%   CFGVHT is the format configuration object of type <a href="matlab:help('wlanVHTConfig')">wlanVHTConfig</a> which
%   specifies the parameters for the VHT format.
% 
%   Example:
%   %  Generate the VHT-STF signal for a VHT 80MHz transmission format
% 
%     cfgVHT = wlanVHTConfig;                % Format configuration
%     cfgVHT.ChannelBandwidth = 'CBW80';     % Set to 80MHz 
%     vstfOut = wlanVHTSTF(cfgVHT);
% 
%   See also wlanVHTConfig, wlanLSTF, wlanVHTLTF.

%   Copyright 2015-2016 The MathWorks, Inc.

%#codegen

validateattributes(cfgVHT, {'wlanVHTConfig'},{'scalar'},mfilename, ...
    'VHT format configuration object');
validateConfig(cfgVHT,'SMapping');
               
% Get OFDM parameters
numSTSTotal = sum(cfgVHT.NumSpaceTimeStreams);    
cfgOFDM = wlan.internal.wlanGetOFDMConfig(cfgVHT.ChannelBandwidth, ...
    'Long','VHT',numSTSTotal);

% Get cyclic shift per space-time stream
csh = wlan.internal.getCyclicShiftVal('VHT',numSTSTotal, ...
    wlan.internal.cbwStr2Num(cfgVHT.ChannelBandwidth));

% Generate time-domain STF
y = wlan.internal.vhtSTF(cfgOFDM,csh,cfgVHT.NumTransmitAntennas, ...
    cfgVHT.SpatialMapping,cfgVHT.SpatialMappingMatrix);

end

% [EOF]