MATLAB Examples

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.

constDiagram(refConst)