| Communications Toolbox™ | ![]() |
h = modem.genqammod(property1, value1,
...)
h = modem.genqammod(GENQAMdemod_object)
h = modem.genqammod(GENQAMdemod_object,
property1, value1, ...)
h = modem.genqammod
The modem.genqammod function creates a modulator object that you can use with the modulate method to modulate a signal. To learn more about the process for modulating a signal, see Using Modem Objects.
h = modem.genqammod(property1, value1, ...) constructs a General QAM modulator object h with properties as specified by the property/value pairs.
h = modem.genqammod(GENQAMdemod_object) constructs a General QAM modulator object h by reading the property values from the General QAM demodulator object, GENQAMdemod_object. The properties that are unique to the General QAM modulator object are set to default values.
h = modem.genqammod(GENQAMdemod_object, property1, value1, ...) constructs a General QAM modulator object h by reading the property values from the General QAM demodulator object, GENQAMdemod_object. Additional properties are specified using property/value pairs.
h = modem.genqammod constructs a General QAM modulator object h with default properties. It constructs a modulator object for 16-QAM modulation, and is equivalent to:
h = modem.genqammod('Constellation', [-3+j*3, -3+j*1, ...
-3-j*1, -3-j*3, -1+j*3, -1+j*1, -1-j*1, -1-j*3, ...
1+j*3, 1+j*1, 1-j*1, 1-j*3, 3+j*3, 3+j*1, 3-j*1, ...
3-j*3], 'InputType', 'integer') This object has a method modulate that is used to modulate signals.
The syntax is y = modulate(h, x), where h is the handle to a modulator object and x is a signal. This syntax outputs the baseband signal y.
x can be a multichannel signal. The columns of x are considered individual channels, while the rows are time steps.
When mapping input bits to symbols, the first bit is interpreted as the most significant bit.
For h.inputtype = ‘bit' (i.e., x represents
binary input), nBits consecutive elements in
each channel or column represent a symbol, where nBits =
log2(h.M). The number of
elements in each channel must be an integer multiple of nBits,
and elements of x must be 0 or 1. For an input x of
size
, an output y of
size
is computed.
For h.inputtype = ‘integer' (i.e., x represents
symbol input), elements of x must be in the range
[0, h.M-1]. For an input x of
size
, an output y of
size
is computed.
See Using Modem Objects for usage examples.
A General QAM modulator object has the following properties. All the properties are writable unless explicitly noted otherwise.
| Property | Description |
|---|---|
| Type | Type of modulation object. This is a fixed value, set to 'General QAM Modulator'. |
| M | M-ary value. This property is not writable, and is automatically computed based on Constellation. |
| Constellation | Signal constellation.. |
| InputType | Type of input to be processed by the General QAM modulator object. The choices are 'bit' (bit/binary output), and 'integer' (integer/symbol output). |
A General QAM modulator object has the following functions for inspection, management, and simulation:
See Using Modem Objects for details and examples of their use.
% Construct a General QAM modulator object with an
% equidistant 3-point constellation on the unit circle.
M = 3;
h = modem.genqammod('Constellation', exp(j*2*pi*[0:M-1]/M))
% Construct a General QAM object to modulate binary data
% using a two-tiered constellation.
h = modem.genqammod('Constellation', [exp(j*2*pi*[0:3]/4) ...
2*exp(j*(2*pi*[0:3]/4+pi/4))], 'InputType', 'Bit')
plot(h.Constellation, '*');grid on;axis('equal',[-2 2 -2 2]);
% Construct a modulator object from an existing
% demodulator object for general QAM demodulation in order
% to compute approximate log-likelihood ratio for a baseband
% signal whose estimated noise variance is 0.81.
demodObj = modem.genqamdemod('Constellation', [-1 1 2*j -2*j], ...
'OutputType', 'Bit')
modObj = modem.genqammod(demodObj)modem, modem.dpskdemod, modem.dpskmod, modem.genqamdemod, modem.mskdemod, modem.mskmod, modem.oqpskdemod, modem.oqpskmod, modem.pamdemod, modem.pammod, modem.pskdemod, modem.pskmod, modem.qamdemod, and modem.qammod
![]() | modem.genqamdemod | modem.mskdemod | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |