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.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Generate eye diagram

`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(...)

`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`

:

If

`x`

is a real two-column matrix,`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.If

`x`

is a complex vector,`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.If x is a real vector,

`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 character vector whose format and meaning are the same as in the `plot`

function. The default value 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 in a new
figure. `h`

must be a handle to a figure that `eyediagram`

previously
generated.

You cannot use `hold on`

to plot multiple signals
in the same figure.

`h = eyediagram(...)`

is
the same as the earlier syntaxes, except that `h`

is
the handle to the figure that contains the eye diagram.

For an online demonstration, type `showdemo scattereyedemo`

.

Was this topic helpful?