Display eye diagram of time-domain signal
Communications Toolbox / Comm Sinks
Communications Toolbox HDL Support / Comm Sinks
Mixed-Signal Blockset / Utilities
SerDes Toolbox / Utilities
The Eye Diagram block displays multiple traces of a modulated signal to produce an eye diagram. You can use the block to reveal the modulation characteristics of the signal, such as the effects of pulse shaping or channel distortions.
The Eye Diagram block has one input port. This block accepts a column vector or scalar input signal. The block accepts a signal with the following data types: double, single, base integer, and fixed point. All data types are cast as double before the block displays results.
To modify the eye diagram display, select SCOPE and click the Settings Properties button () in CONFIGURATION.
View Eye Diagram
Display the eye diagram of a filtered QPSK signal using the Eye Diagram block.
Open the model
doc_eye_diagram_scope_new. Run the model and
observe the eye diagram displayed.
model = 'doc_eye_diagram_scope_new.slx'; open_system(model) sim(model)
In — Input signal
scalar | column vector
Input signal, specified as a scalar or column vector.
Display and Traces
Samples per symbol — Samples per symbol
8 (default) | positive integer
Number of samples per symbol, specified as a positive integer. Use with Symbols per trace to determine the number of samples per trace.
Sample offset — Sample offset
0 (default) | nonnegative integer
Sample offset, specified as a nonnegative integer smaller than the product of Samples per symbol and Symbols per trace. The offset provides the number of samples to omit before plotting the first point.
Symbols per trace — Symbols per trace
2 (default) | positive integer
Number of symbols plotted per trace, specified as a positive integer.
Traces to display — Number of traces to display
40 (default) | positive integer
Number of traces plotted, specified as a positive integer.
Color fading — Color fading
Select this check box to fade the points in the display as the interval of time after they are first plotted increases.
Plot Imaginary Axes — Plot imaginary axes
Select this check box to display the imaginary plot of the eye diagram.
Axes and Labels
Real axes label — Real axis label
Real Amplitude (default)
Text that the scope displays along the real axis.
Title — Title label
Label that appears above the eye diagram plot.
Imaginary axes label — Imaginary axis label
Imaginary Amplitude (default)
Text that the scope displays along the imaginary axis.
Y-limits — Lower and upper limit values
[-1.1,1 1] (default) | scalar
Lower and upper limit values of the y-axis.
Show grid — Show grid on plot
on (default) |
Select this radio button to show the on the scope window.
COLOR AND STYLING
Use this tab to customize the style of the active display. You can change the color of the figure containing the displays, the background and foreground colors of display axes, and properties of lines in a display.
Preserve colors for copy to clipboard — Preserve colors for copy to clipboard
off (default) |
Select this radio button to preserve the colors when copying to a clipboard.
Background — Background colors
Specify the background color for the plot..
Axes — Axes colors
Specify the fill and line colors for the axes.
Labels — Label colors
Specify the color of the labels on the axes.
Style — Line style
Specify the line style for the displayed signal.
Width — Thickness for line plots
Specify the line thickness for the lines on displayed signal.
Marker — Data point marker
None (default) | ...
Data point marker for the selected signal, specified as one of the
choices in this table data point markers. This parameter is similar to
Marker property for MATLAB®
Handle Graphics® plot objects.
|none||No marker (default)|
|Five-pointed star (pentagram)|
|Six-pointed star (hexagram)|
Color — Color for lines
Specify the color for the lines on displayed signal.
Using Eye Diagram in Conditionally Executed Subsystems
When an Eye Diagram block is placed in a conditionally executed subsystem, for example in a triggered or enabled subsystem:
Input size must be an integer multiple of
Sample offset must be zero
The rightmost part of the display is intentionally omitted. This figure compares typical eye diagram display when placed in a normal system versus one placed in a conditionally executed subsystem.
Eye Diagram Plot in Normal System Eye Diagram Plot in Conditionally Executed Subsystem In a regular Eye Diagram, the rightmost part is a line between the last sample of a trace and the first sample of the next trace. In conditionally executed subsystems, these traces may be non-contiguous, thus this rightmost segment could corrupt the display and is omitted.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
This block is excluded from the generated code when code generation is performed on a system containing this block.
HDL Code Generation
Generate VHDL, Verilog and SystemVerilog code for FPGA and ASIC designs using HDL Coder™.
This block can be used for simulation visibility in subsystems that generate HDL code, but is not included in the hardware implementation.
Introduced in R2023b