Function File: eyediagram (x, n)
Function File: eyediagram (x, n, per)
Function File: eyediagram (x, n, per, off)
Function File: eyediagram (x, n, per, off, str)
Function File: eyediagram (x, n, per, off, str, h)
Function File: h = eyediagram (…)

Plot the eye-diagram of a signal. The signal x can be either in one of three forms

A real vector

In this case the signal is assumed to be real and represented by the vector x. A single eye-diagram representing this signal is plotted.

A complex vector

In this case the in-phase and quadrature components of the signal are plotted separately.

A matrix with two columns

In this case the first column represents the in-phase and the second the quadrature components of a complex signal.

Each line of the eye-diagram has n elements and the period is assumed to be given by per. The time axis is then [-per/2 per/2]. By default per is 1.

By default the signal is assumed to start at -per/2. This can be overridden by the off variable, which gives the number of samples to delay the signal.

The string str is a plot style string (example "r+"), and by default is the default gnuplot line style.

The figure handle to use can be defined by h. If h is not given, then the next available figure handle is used. The figure handle used in returned on hout.

See also: scatterplot.

Demonstration 1

The following code

 n = 50;
 ovsp = 50;
 x = 1:n;
 xi = [1:1/ovsp:n-0.1];
 y = randsrc (1, n, [1 + i, 1 - i, -1 - i, -1 + i]);
 yi = interp1 (x, y, xi);
 noisy = awgn (yi, 15, "measured");
 eyediagram (noisy, ovsp);

Produces the following figure

Figure 1

Package: communications