Communications Toolbox | ![]() ![]() |
Syntax
eyediagram(x,n); eyediagram(x,n,period); eyediagram(x,n,period,offset); eyediagram(x,n,period,offset,plotstring); eyediagram(x,n,period,offset,plotstring,h); h = eyediagram(...);
Description
eyediagram(x,n)
creates an eye diagram for the signal x
, plotting n
samples in each trace. n
must be an integer greater than 1. The labels on the horizontal axis of the diagram range between -1/2 and 1/2. The function assumes that the first value of the signal, and every n
th value thereafter, occur at integer times. The interpretation of x
and the number of plots depend on the shape and complexity of x
:
x
is a real two-column matrix, then eyediagram
interprets the first column as in-phase components and the second column as quadrature components. The two components appear in different subplots of a single figure window.
x
is a complex vector, then eyediagram
interprets the real part as in-phase components and the imaginary part as quadrature components. The two components appear in different subplots of a single figure window.
eyediagram
interprets it as a real signal. The figure window contains a single plot.
eyediagram(x,n,period)
is the same as the syntax above, except that the labels on the horizontal axis range between -period/2
and period/2
.
eyediagram(x,n,period,offset)
is the same as the syntax above, except that the function assumes that the (offset+1
)st value of the signal, and every n
th value thereafter, occur at times that are integer multiples of period
. The variable offset
must be a nonnegative integer between 0 and n-1
.
eyediagram(x,n,period,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 string whose format and meaning are the same as in the plot
function. The default string is 'b-'
, which produces a blue solid line.
eyediagram(x,n,period,offset,plotstring,h)
is the same as the syntax above, except that the eye diagram is in the figure whose handle is h
, rather than a new figure. h
must be a handle to a figure that eyediagram
previously generated.
h = eyediagram(...)
is the same as the earlier syntaxes, except that h
is the handle to the figure that contains the eye diagram.
Examples
See Example: Eye Diagrams for an example. For an online demonstration, type playshow scattereyedemo
.
See Also
scatterplot
, plot
, scattereyedemo
![]() | encode | fft | ![]() |