📄 test_qammod.m
字号:
M = 16;
x = [0:M-1];
y = qammod(x,M);
%scale = modnorm(y,'peakpow',1);
y = scale*y; % Scale the constellation.
scatterplot(y); % Plot the scaled constellation.
% Include text annotations that number the points.
%hold on; % Make sure the annotations go in the same figure.
%for jj=1:length(y)
% text(real(y(jj)),imag(y(jj)),[' ' num2str(jj-1)]);
%end
%hold off;
% Plot the Gray-coded constellation.
scatterplot(y,1,0,'b.'); % Dots for points.
% Include text annotations that number the points in binary.
hold on; % Make sure the annotations go in the same figure.
annot = dec2bin([0:length(y)-1],log2(M));
text(real(y)+0.15,imag(y),annot);
axis([-1 1 -1 1]);
title('Constellation for Gray-Coded 8-QAM');
hold off;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -