Main Content


Modulate using arbitrary QAM constellation


The comm.GeneralQAMModulator object modulates using quadrature amplitude modulation. The output is a baseband representation of the modulated signal.

This object accepts variable-size inputs. After the object is locked, you can change the size of each input channel, but you cannot change the number of channels. For more information, see Variable-Size Signal Support with System Objects.

To modulate a signal using quadrature amplitude modulation:

  1. Define and set up your QAM modulator object. See Construction.

  2. Call step to modulate a signal according to the properties of comm.GeneralQAMModulator. The behavior of step is specific to each object in the toolbox.


Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.


H = comm.GeneralQAMModulator creates a modulator System object, H. This object modulates the input signal using a general quadrature amplitude modulation (QAM) method.

H = comm.GeneralQAMModulator(Name,Value) creates a QAM modulator object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

H = comm.GeneralQAMModulator(CONST,Name,Value) creates a General QAM modulator object, H. This object has the Constellation property set to CONST, and the other specified properties set to the specified values.



Signal constellation

Specify the constellation points as a vector of real or complex double-precision data type. The default is exp(2×π×1i×(0:7)8). The length of the vector determines the modulation order. The step method inputs requires integers between 0 and M–1, where M indicates the length of this property vector. The object maps an input integer m to the (m+1)st value in the Constellation vector.


Data type of output

Specify the output data type as one of double | single | Custom. The default is double.

 Fixed-Point Properties


stepModulate using arbitrary QAM constellation
Common to All System Objects

Allow System object property value changes


Modulate data using an arbitrary 3-point constellation. Then, visualize the data in a scatter plot

       hQAMMod = comm.GeneralQAMModulator;     
  % Setup a three point constellation
       hQAMMod.Constellation = [1 1i -1];
       data = randi([0 2],100,1);
       modData = step(hQAMMod, data);


This object implements the algorithm, inputs, and outputs described on the General QAM Modulator Baseband block reference page. The object properties correspond to the block parameters.

Extended Capabilities

Version History

Introduced in R2012a