?? qam4.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 + -