?? 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 + -