Quantcast

Documentation Center

  • Trial Software
  • Product Updates

genqammod

General quadrature amplitude modulation

Syntax

y = genqammod(x,const)

Description

    Warning   This function is obsolete and may be removed in the future. We strongly recommend that you use the comm.GeneralQAMModulator System object™ instead.

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.

Examples

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.

See Also

| | | |

Was this topic helpful?