| Communications Toolbox | ![]() |
General quadrature amplitude modulation
y = genqammod(x,const)
y = genqammod(x,const) outputs the complex envelope y of the modulation of the message signal x using quadrature amplitude modulation. The message signal must consist of integers between 0 and length(const)-1. The complex vector const specifies the signal mapping. If x is a matrix with multiple rows, then the function processes the columns independently.
The code below plots a signal constellation that has a hexagonal structure. It also uses genqammod and genqamdemod to modulate and demodulate a message [3 8 5 10 7] using this constellation.
% Describe hexagonal constellation.
inphase = [1/2 1 1 1/2 1/2 2 2 5/2];
quadr = [0 1 -1 2 -2 1 -1 0];
inphase = [inphase;-inphase]; inphase = inphase(:);
quadr = [quadr;quadr]; quadr = quadr(:);
const = inphase + j*quadr;
% Plot constellation.
h = scatterplot(const);
% Modulate message using this constellation.
x = [3 8 5 10 7]; % Message signal
y = genqammod(x,const);
z = genqamdemod(y,const); % Demodulate.
% Plot modulated signal in same figure.
hold on; scatterplot(y,1,0,'ro',h);
legend('Constellation','Modulated signal','Location','NorthWest'); % Include legend.
hold off;

Another example using this function is the Gray-coded constellation example in Examples of Signal Constellation Plots.
genqamdemod, qammod, qamdemod, pammod, pamdemod, Modulation
| genqamdemod | gf | ![]() |
© 1994-2005 The MathWorks, Inc.