test_qammod.m
来自「通过图形实现OFMD的图像仿真」· M 代码 · 共 23 行
M
23 行
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 + =
减小字号Ctrl + -
显示快捷键?