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

📄 qam4.m

📁 QAM 4 Modulator and Demodulator based on ETSI TETRA Standard
💻 M
字号:

% Function for 16 - QAM Modulation Take a minimum 1*4 element  input to
% Modulate 
% i_qam use for input
% o_qam use for output of qam

function o_qam = qam4(i_qam)
% disp('QAM 16 modulation');
  temp  = size(i_qam);
  row   = temp(1);
  colom = temp(2);
  %o_qam = null;
  
  %database of QAM Mapping
  %         0   1   2    3  
  qam_arr=[1+j 1-j -1+j -1-j];
  
  
for iq=1:row
    %converting the binary to decimal 
    % 0000     ....  0  qam produce -3 - 3i
      
    %decimal conversion  MSB ----- > LSB
    
%       decimal = i_qam(iq,4) + 2 * i_qam(iq,3) + 4 * i_qam(iq,2) + 8 * i_qam(iq,1)  ; 
    dec = i_qam(iq);
     %disp('decimal');
     %disp(decimal) ;
              
             % o_qam(iq,1) = qam_arr(decimal+1) ;
              o_qam(iq,:) = qam_arr(dec+1) ;
      % disp(o_qam(iq) );
      % disp('ok');
end                   
 end %end of qam function

⌨️ 快捷键说明

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