gusucode.com > wlan工具箱matlab源码程序 > wlan/wlan/+wlan/+internal/mergeSubchannels.m
function [demodSC,chanEstSC] = mergeSubchannels(demod,chanEst,Nsc) %mergeSubchannels merge subchannels with channel bandwidth for equalization % % Note: This is an internal undocumented function and its API and/or % functionality may change in subsequent releases. % % [DEMODSC,CHANESTSC] = mergeSubchannels(DEMOD,CHANEST,NSC) returns the % merged demodulated symbols and channel estimates for each subchannel. % Each subchannel is typically 20 MHz within the entire channel % bandwidth. The subchannels are merged to appear as additional receive % antennas to simplify combining during equalization. % % DEMODSC is a Nsd/Nsc-by-Nsym-by-Nsc*Nr matrix containing the merged % demodulated symbols. Nsd is the number of subcarriers in the input % demodulated data for the entire channel bandwidth. Nsym is the number % of OFDM symbols. Nsc is the number of subchannels (e.g. 20 MHz) within % the entire channel bandwidth (e.g. 160 MHz). Nr is the number of % receive antennas. % % CHANESTSC is a Nsd/Nsc-by-1-by-Nsc*Nr matrix containing the % merged channel estimates. % % DEMOD is a Nsd-by-Nsym-by-Nr matrix containing demodulated symbols for % the entire channel bandwidth. % % CHANEST is a Nsd-by-1-by-Nr matrix containing demodulated symbols for % the entire channel bandwidth. % Copyright 2016 The MathWorks, Inc. %#codegen % Merge Nsc channel estimates and demodulated symbols together for the % repeated subcarriers [Nsd,Nsym,Nr] = size(demod); % [Num subcarriers, Num symbols, Nu. receive antennas] Nsdpsc = Nsd/Nsc; % Number of subcarriers per subchannel (e.g. 20 MHz) demodSC = reshape(permute( ... reshape(demod,Nsdpsc,Nsc,Nsym,Nr),[1 3 4 2]),Nsdpsc,Nsym,Nsc*Nr); chanEstSC = reshape(permute( ... reshape(chanEst,Nsdpsc,Nsc,Nr),[1 3 2]),Nsdpsc,1,Nsc*Nr); end