Communications Toolbox    
eyediagram

Generate an eye diagram

Syntax

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 nth value thereafter, occur at integer times. The interpretation of x and the number of plots depend on the shape and complexity of x:

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 nth 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.

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, use scattereyedemo.

See Also
scatterplot, plot


 encode gen2par