System object: comm.RectangularQAMDemodulator
Package: comm

(To be removed) Calculate or plot ideal signal constellation

comm.RectangularQAMDemodulator will be removed in a future release. Use qamdemod instead.


y = constellation(h)


y = constellation(h) returns the numerical values of the constellation.

constellation(h) generates a constellation plot for the object.


expand all

Plot QAM reference constellation using the qammod and qamdemod functions. Show that the 'PlotConstellation,true' Name,Value pair property works for both qammod and qamdemod functions. Also show the symbol ordering for Gray and binary code ordering by representing the data in binary format.

Create symbols for a 16-QAM modulator.

M = 16; % For 16-QAM
refSym = (0:M-1)';

Plot the reference constellation using the qammod function.


The default symbol order is Gray code ordering. To highlight the Gray symbol mapping, replot the reference constellation using binary input type. When you specify 'InputType','bit', the input signal must contain binary values, and the number of rows must be an integer multiple of log2(M). Tranpose the input vector so that the input symbols map to the column vectors.

biRefSym = de2bi(refSym);

Replot the reference constellation using binary-coded symbol ordering.

biRefSym = de2bi(refSym);

Create symbols for a 64-QAM modulator.

M = 64; % For 64-QAM
refSym = (0:M-1);

Plot the reference constellation using the qamdemod function.