test_qammod_gray.m
来自「通过图形实现OFMD的图像仿真」· M 代码 · 共 13 行
M
13 行
M = 16;
x = [0:M-1];
y = qammod(x,M,[],'gray');
% 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([-4 4 -4 4]);
title('Constellation for Gray-Coded 8-QAM');
hold off;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?