Plot the eye-diagram of a signal. The signal x can be either in one of three forms
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.
In this case the in-phase and quadrature components of the signal are plotted separately.
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.
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