Accelerating the pace of engineering and science

# comm.GeneralQAMModulator System object

Package: comm

Modulate using arbitrary QAM constellation

## Description

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

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.

## Construction

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.

## Properties

 Constellation Signal constellation Specify the constellation points as a vector of real or complex double-precision data type. The default is exp($2×\pi ×1i×\left(0:7\right)}{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. OutputDataType Data type of output Specify the output data type as one of double | single | Custom. The default is double.

## Methods

 clone Create general QAM modulator object with same property values getNumInputs Number of expected inputs to step method getNumOutputs Number of outputs from step method isLocked Locked status for input attributes and nontunable properties release Allow property value and input characteristics changes step Modulate using arbitrary QAM constellation

## Examples

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);
scatterplot(modData)
```

## Algorithms

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.