Main Content

scatterplot

Generate scatter plot

Description

example

scatterplot(x)creates a scatter plot for signalx.

scatterplot(x,n)specifies decimation factorn. The function plot everynth value ofx, starting from its first value.

scatterplot(x,n,offset)specifies the offset value. The function plots everynth value ofx, starting from its (offset+ 1)th value.

scatterplot(x,n,offset,plotstring)specifies plot attributes for the scatter plot.

scatterplot(x,n,offset,plotstring,scatfig)generates the scatter plot in the existingFigureobject,scatfig. To plot multiple signals in the same figure, usehold on.

scatfig= scatterplot(___)returns theFigureobject of the scatter plot. Usescatfigto query or modify properties of the figure after it is created. You can specify any of the input argument combinations from the previous syntaxes.

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)

Figure Scatter Plot contains an axes object. The axes object with title Scatter plot contains an object of type line. This object represents Channel 1.

Input Arguments

collapse all

Input signal, specified as a vector or matrix.

The interpretation ofxdepends on its shape and complexity.

  • Ifxis a real-valued two-column matrix, the function interprets the first column as in-phase components and the second column as quadrature components.

  • Ifxis a complex-valued vector, the function interprets the real part as in-phase components and the imaginary part as quadrature components.

  • Ifxis a real-valued vector, the function interprets it as a real signal.

Data Types:double|single
Complex Number Support:Yes

Decimation factor, specified as a positive integer. The function plots everynth value of input signalx, starting from its first value.

Data Types:double

Offset value, specified as a nonnegative integer. This offset value specifies the number of samples at the beginning of inputxthat the function skips before generating the scatter plot.

Data Types:double

Plot attributes, specified as a character vector or string scalar containing symbols.

This argument sets the plotting symbol, line type, and color for the scatter plot. The format and meaning of the symbols are the same as in theplotfunction. For example, the default value'b.'produces blue dots.

Data Types:char|string

Target scatterplot, specified as aFigureobject for a previously generatedscatterplot.

Output Arguments

collapse all

Target scatterplot, returned as aFigureobject. To modify properties of this object, seeFigure Properties.

Introduced before R2006a