Communications Toolbox | ![]() ![]() |
Map a message to a QASK square signal constellation
Syntax
Description
qaskenco(M)
plots the square signal constellation for M
-ary quadrature amplitude shift keying (QASK) modulation, labeling the M
points with numbers in the range [0, M
-1]. M
must be a power of 2. If M
is a perfect square, then qaskenco
labels the constellation points so as to implement Gray code.
qaskenco(msg,M)
is the same as the syntax above, except that only those points with labels in the vector msg
are plotted. The elements in msg
must be integers in the range [0, M
-1].
[inphase,quadr] = qaskenco(M)
returns vectors inphase
and quadr
that represent the coordinates of the points in the signal constellation for M
-ary QASK modulation. inphase
gives the in-phase component of each point and quadr
gives the quadrature component of each point. M
must be a power of 2.
[inphase,quadr] = qaskenco(msg,M)
is the same as the syntax above, except that inphase
and quadr
represent only those constellation points with labels in the vector msg
. (These labels are the same number labels that appear in the plot that the command qaskenco(msg,M)
produces.) The elements in msg
must be integers in the range [0, M
-1].
The table below shows the maximum value of inphase
and quadr
, for several small values of M
.
M |
Maximum of inphase and quadr |
M |
Maximum of inphase and quadr |
2 |
1 |
32 |
5 |
4 |
1 |
64 |
7 |
8 |
3 (maximum of quadr is 1) |
128 |
11 |
16 |
3 |
256 |
15 |
Examples
The command below displays that part of the 8-ary QASK square constellation that corresponds to the points in the digital message signal [0 3 4 3 2 5].
The commands below capture the same information in vectors inphase
and quadr
instead of in a plot.
[inphase,quadr] = qaskenco([0 3 5 3 2 5],8); inphase' ans = 1 -1 -3 -1 1 -3 quadr' ans = 1 -1 1 -1 -1 1
The command below captures in inphase
and quadr
the coordinates of all eight points in the 8-ary QASK square constellation.
See Also
encode
, modmap
, qaskdeco
![]() | qaskdeco | quantiz | ![]() |