| SimEvents® | ![]() |
SimEvents Sinks
This block creates a plot using data from a signal. The plot is particularly appropriate for data arising from discrete-event simulations or data related to entities because the plot can include zero-duration values.
The data for the vertical axis comes from the signal connected to the block's signal input port labeled in.
The Plot type parameter on the Plotting tab determines whether and how the block connects the points that it plots. For details, see Connections Among Points in Plots.
Use the X value from parameter to select the type of data for the horizontal axis. The table below describes the choices.
| Source of X Data | Description of Plot |
|---|---|
| Event time | Plot of the in signal versus simulation time. For example, you might use this option to see how the length of a queue changes over time. |
| Index | Plot of the in signal's successive values against a horizontal axis that represents the index of the values. The signal's first value during the simulation has an index of 1, the signal's second value has an index of 2, and so on. For example, you might use this option for a signal that has zero-duration values, to help determine the exact sequence among values that the signal assumes simultaneously. |
The figures below illustrate the different sources of data for the horizontal axis. The plots look similar, except that the second plot has uniform horizontal spacing rather than time-based spacing between successive points.


Signal Input Ports
| Label | Description |
|---|---|
| in | Signal containing data for the Y axis. |
Signal Output Ports
| Label | Description |
|---|---|
| #c | Number of points the block has plotted. |
The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0.
To open the block dialog box, click the Parameters toolbar button in the plot window.

The presentation format for the data. See Connections Among Points in Plots for details.
Source of data for the plot's horizontal axis. See Selecting Data for the Horizontal Axis for details.
Selecting this option causes the plot window to open when you start the simulation. If you clear this box, you can open the plot window by double-clicking the block icon.

The interval shown on the X axis at the beginning of the simulation. The interval might change from this initial setting due to zooming, autoscaling, or the If X value is beyond limit setting.
Determines how the plot changes if one or more X values are not within the limits shown on the X axis. For details, see Varying Axis Limits Automatically.
The interval shown on the Y axis at the beginning of the simulation. The interval might change from this initial setting due to zooming, autoscaling, or the If Y value is beyond limit setting.
Determines how the plot changes if one or more values of the in signal are not within the limits shown on the Y axis. For details, see Varying Axis Limits Automatically.
Toggles the grid on and off.

Text that appears as the title of the plot, above the axes.
Text that appears to the left of the vertical axis.
Text that appears below the horizontal axis.
A four-element vector of the form [left bottom width height] specifying the position of the scope window. (0,0) is the lower left corner of the display.
Displays the number of plotted points using an annotation in the plot window.

Select Unlimited to have the block cache all data for future viewing, Limited to cache a portion of the most recent data, and Disabled to avoid caching undisplayed data.
The number of data points the block caches, using the most recent data. This field appears only if you set Store data when scope is closed to Limited.
These parameters determine whether certain ports produce data throughout the simulation, produce data only when you stop or pause the simulation, or are omitted from the block. For descriptions of the affected ports, see the "Signal Output Ports" table above.

Controls the presence and behavior of the signal output port labeled #c.
X-Y Signal Scope, Attribute Scope
![]() | Signal Latch | Signal-Based Event to Function-Call Event | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |