This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Plot Signal Constellations

Create 16-PSK Constellation Diagram

This example shows how to plot a PSK constellation having 16 points.

Set the parameters for 16-PSK modulation with no phase offset and binary symbol mapping.

M = 16;             % Modulation alphabet size
phOffset = 0;       % Phase offset
symMap = 'binary';  % Symbol mapping (either 'binary' or 'gray')

Construct the modulator object.

pskModulator = comm.PSKModulator(M,phOffset,'SymbolMapping',symMap);

Plot the constellation.


Create 32-QAM Constellation Diagram

This example shows how to plot a QAM constellation having 32 points.

Construct the modulator object using name-value pairs to set the properties.

qamModulator = comm.RectangularQAMModulator('ModulationOrder',32, ...

Plot the constellation.


Create 8-QAM Gray Coded Constellation Diagram

This example shows how to plot a Gray-coded 8-QAM constellation.

Construct the modulator object using a name-value pair to set the properties. Note that Gray coding is the default symbol mapping for the comm.RectangularQAMModulator System object.

qamModulator = comm.RectangularQAMModulator('ModulationOrder',8);

Plot the constellation.


Plot a Triangular Constellation for QAM

This example shows how to plot a customized QAM reference constellation.

Describe the constellation.

inphase = [1/2 -1/2 1 0 3/2 -3/2 1 -1];
quadr = [1 1 0 2 1 1 2 2];
inphase = [inphase; -inphase];
inphase = inphase(:);
quadr = [quadr; -quadr];
quadr = quadr(:);
refConst = inphase + 1i*quadr;

Construct a constellation diagram System object using name-value pairs to specify the title, the axes limits, the reference marker type, and the reference marker color.

constDiagram = comm.ConstellationDiagram('Title','Customized Constellation for QAM', ...
    'XLimits',[-3 3],'YLimits',[-3 3], ...
    'ReferenceConstellation',refConst, ...
    'ReferenceMarker','*','ReferenceColor',[0 1 0]);

Plot the customized constellation.


See Also

Was this topic helpful?