Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

scatterplot

Generate scatter plot

Syntax

scatterplot(x)
scatterplot(x,n)
scatterplot(x,n,offset)
scatterplot(x,n,offset,plotstring)
scatterplot(x,n,offset,plotstring,h)
h = scatterplot(...)

Description

scatterplot(x) produces a scatter plot for the signal x. The interpretation of x depends on its shape and complexity:

  • If x is a real two-column matrix, scatterplot interprets the first column as in-phase components and the second column as quadrature components.

  • If x is a complex vector, scatterplot interprets the real part as in-phase components and the imaginary part as quadrature components.

  • If x is a real vector, scatterplot interprets it as a real signal.

scatterplot(x,n) is the same as the first syntax, except that the function plots every nth value of the signal, starting from the first value. That is, the function decimates x by a factor of n before plotting.

scatterplot(x,n,offset) is the same as the first syntax, except that the function plots every nth value of the signal, starting from the (offset+1)st value in x.

scatterplot(x,n,offset,plotstring) is the same as the syntax above, except that plotstring determines the plotting symbol, line type, and color for the plot. plotstring is a character vector whose format and meaning are the same as in the plot function.

scatterplot(x,n,offset,plotstring,h) is the same as the syntax above, except that the scatter plot is in the figure whose handle is h, rather than a new figure. h must be a handle to a figure that scatterplot previously generated. To plot multiple signals in the same figure, use hold on.

h = scatterplot(...) is the same as the earlier syntaxes, except that h is the handle to the figure that contains the scatter plot.

Examples

collapse all

Create a 64-QAM signal in which each constellation point is used.

d = (0:63)';
s = qammod(d,64);

Display the scatter plot of the constellation.

scatterplot(s)

Related Examples

More About

collapse all

Tips

Use comm.ConstellationDiagram when these are required:

  • Measurements

  • Basic reference constellations

  • Signal trajectory plots

  • Maintaining state between calls

Use scatterplot when:

  • A simple snapshot of the signal constellation is needed.

Introduced before R2006a

Was this topic helpful?