📄 td-scdma_16qamconstall.m
字号:
% close all
clear
clc
% Ideal constellation
M = 16; % Number of points in constellation
h=modem.qammod(M); % Modulator object
% h=modem.qammod('M', 16, 'PhaseOffset', -45); % Modulator object
mapping=h.SymbolMapping; % Symbol mapping vector
pt = h.Constellation; % Vector of all points in constellation
% Plot the constellation.
scatterplot(pt);
% Include text annotations that number the points.
text(real(pt)+0.1,imag(pt),dec2bin(mapping));
axis([-4 4 -4 4]); % Change axis so all labels fit in plot.
title('Ideal 16QAM constellation');
% TD-SCDMA 16QAM constellation
M = 16; % Number of points in constellation
SymbolMapping = [11, 10, 14, 15, 9, 8, 12, 13, 1, 0, 4, 5, 3, 2, 6, 7];
PhaseOffset = 0.7854; % 45 degreee
h=modem.qammod('M', 16, 'PhaseOffset', PhaseOffset, 'SymbolOrder', 'user-defined', 'SymbolMapping', SymbolMapping); % Modulator object
mapping=h.SymbolMapping; % Symbol mapping vector
pt = h.Constellation; % Vector of all points in constellation
% Plot the constellation.
scatterplot(pt);
% Include text annotations that number the points.
text(real(pt)+0.1,imag(pt),dec2bin(SymbolMapping));
axis([-5 5 -5 5]); % Change axis so all labels fit in plot.
title('TD-SCDMA 16QAM constellation');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -