www.pudn.com > ldpc802.16.rar > DeSubChanMap.m, change:2005-11-07,size:1235b


function CodeSym=DeSubChanMap(SymInSubChan,SchAlloc,SubChanFormat,SubChanToCar) 
 
%convert subchannel group symbols to code symbol block 
%the input symbols will be read in the original order 
% CodeSym=DeSubChanMap(SymInSubChan,SchAlloc,SubChanFormat,SubChanToCar) 
% inputs:  
%   SymInSubChan: vector of coded symbols to be mapped 
%   SchAlloc: format for symbol out 
%   SubChanFormat: subchannel definition 
%   SubChanToCar: subchannel to subcarrier index mapping 
% Outputs: 
%   CodeSym: symbols used for channel decoder 
% 2005.11.6, Hang Li 
 
NsymPerSc=SubChanFormat.Nf*SubChanFormat.Nt-size(SubChanFormat.Pilot,2); 
NschUsed=size(SchAlloc,2); 
CodeSym=zeros(NsymPerSc*size(SchAlloc,2),1); 
sym_st=1; 
for si=1:SubChanFormat.Nt,                     %time second 
    SchPilotFreqInd=SubChanFormat.Pilot(1,find(SubChanFormat.Pilot(2,:)==si)); 
    for sc=1:NschUsed,                          %subchannel 
        SubcarUsedIndex=setdiff(1:SubChanFormat.Nf,SchPilotFreqInd); 
        if length(SubcarUsedIndex)>0, 
            CodeSym(sym_st:sym_st+length(SubcarUsedIndex)-1)=SymInSubChan{SchAlloc(1,sc),SchAlloc(2,sc)}(SubcarUsedIndex,si); 
            sym_st=sym_st+length(SubcarUsedIndex); 
        end; 
    end; 
end;