This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


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, the function processes the columns independently.


collapse all

Create the points that describe a 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 + 1i*quadr;

Plot the constellation.

h = scatterplot(const);

Generate input data symbols. Modulate the symbols using this constellation.

x = [3 8 5 10 7];
y = genqammod(x,const);

Demodulate the modulated signal, y.

z = genqamdemod(y,const);

Plot the modulated signal in same figure.

hold on;
legend('Constellation','Modulated signal');

Determine the number of symbol errors between the demodulated data to the original sequence.

numErrs = symerr(x,z)
numErrs =


Introduced before R2006a

Was this topic helpful?