genqamdemod
General quadrature amplitude demodulation
Syntax
Description
Examples
General QAM Modulation and Demodulation
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; scatterplot(y,1,0,'ro',h); legend('Constellation','Modulated signal'); hold off;
Determine the number of symbol errors between the demodulated data to the original sequence.
numErrs = symerr(x,z)
numErrs = 0
Input Arguments
y
— Complex envelope
scalar | vector | matrix | 3-D array
Complex envelope, specified as a scalar, vector, matrix, or 3-D array of numeric
values. If y
is a matrix with multiple rows, the function processes
the rows independently.
const
— Signal mapping
complex vector
Signal mapping, specified as a complex vector.
Data Types: double
| single
Complex Number Support: Yes
Output Arguments
z
— Message signal
scalar | vector | matrix | 3-D array
Message signal, returned as a scalar, vector, matrix, or 3-D array of numeric
values. The message signal consists of integers between 0 and
length
(const
)–1. The datatype of
z
is the same as the data type of input
x
.
Data Types: double
| single
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)