⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mapper2.m

📁 Mapper for QAM 2,4 and 6 bits, taking streams and mapping 2 symbols for Modulation
💻 M
字号:

% Function Mapping generates the Symbols from the Bit Stream for the Modulate 
% stream use for input
% symbol use for output of qam
%  Symbol is than coverted to Digit.

function digit = mapper2(stream)
if (mod(length(stream),2)~=0)
    pad(mod(length(stream),2))=0;
    stream = [stream ,pad];
end
    
 symbol (length(stream)/2,2) = 0;
 digit = symbol;
j = 1;
k = 1;
   for i=1:length(stream)
          symbol(j,k)=stream(i); 
%           
            k=k+1;
         if (mod(i,2) == 0)
             k=1;
            j=j+1;
         end

 
   end
digit = bi2de(symbol,'left-msb');
end %end of qam function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -