?? qam.m
字號:
%運行編輯調試(F5)
%m文件生成對稱16QAM,64QAM,256QAM 星座圖顯示了幅度和相位 M=2^2,4,6,8(M=4,16,64,256) 能夠產(chǎn)生最小變化。
%4位的格雷碼/符號(M=16) 普遍用于顯示世界中。
%===================================================================
clear;
ampqam=[-3 -1 1 3] %幅度(4 for 16QAM)
A = repmat(ampqam,4,1)
B = flipud(A')
constellation_qam = A+j*B
constellation_qam1 = constellation_qam(:) %改變縱向量
qam = constellation_qam1(floor((16)*rand(1,10000))+1);%生成16QAM的序列
figure(1)
plot(qam,'o'); %畫星座圖
axis([-4 4 -4 4]); grid on;
xlabel('Q Amplitude');ylabel('I Amplitude');
title('16 QAM Constellation')
phaseangle_rad=atan2(imag(constellation_qam1),real(constellation_qam1))
phaseangle_deg=57.29577*phaseangle_rad
sort(phaseangle_deg)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -