| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Generators / Signal Generators
This block generates an event-based signal using data you provide, inferring from a subsequent block when to output the next value from your data. You specify the data as a column vector using the Vector of output values parameter. The parameter value can be any MATLAB language expression that evaluates to a column vector, including the name of a column vector variable in the MATLAB base workspace. As an example of inferring timing from a subsequent block, if you connect this block to the t input port of a Single Server block, then the Event-Based Sequence block outputs a new value each time an entity arrives at the server.
If the block needs more data than the vector contains, subsequent output values follow a rule you specify using the Form output after final data value by parameter. The table below lists possible values for this parameter.
Note In all cases, the choice of parameter value affects only the values, not the timing, of the output signal. The output signal is always an event-based signal whose sample time hits depend on notifications from a subsequent block. |
| Parameter Value | Description |
|---|---|
| Cyclic repetition | When the block needs a new output value after exhausting the data, it starts over at the beginning of the vector. |
| Holding final value | After exhausting the data, the block outputs the last data value for every sample time hit. |
| Setting to infinity | After exhausting the data, the block outputs the value inf for every sample time hit. For example, if the block outputs intergeneration times for an entity generator, then the generator produces up to a fixed number of entities. |
| Setting to zero | After exhausting the data, the block outputs zero for every sample time hit. For example, if the block outputs service times for a server, then the server delays up to a fixed number of entities. |
The Event-Based Sequence block has a restricted set of valid connections to other blocks because it is designed to infer from a subsequent block when to generate a new number.
Connections from the Event-Based Sequence block must satisfy all of these conditions:
Exactly one line must connect to a port listed in Notifying Ports
Zero or more lines may connect to ports listed in Monitoring Ports
No lines may connect to other ports; in particular, do not connect this block to the ports listed in Reactive Ports
Note Connections from the Event-Based Sequence block to ports other than notifying ports and monitoring ports are not supported. To create a sequence that can be an input to a reactive port, see the techniques described in Generating Random Signals Based on Arbitrary Events or use time-based blocks such as Repeating Sequence Stair and From Workspace. |
This block has one signal output port for the numbers in the sequence. The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0.
The block has no entity ports, and no signal input port.

A column vector whose entries become values of this block's output signal. To use a column vector variable in the MATLAB base workspace, enter the variable name.
This parameter is tunable from one rapid simulation run to the next, but not within a simulation run. For details, see Running Discrete-Event Simulations Programmatically.
The method for generating output after the block exhausts the data referenced in the Vector of output values parameter.
Event-Based Random Number, Repeating Sequence Stair, From Workspace
Using Data Sets to Create Event-Based Signals
![]() | Event-Based Random Number | FIFO Queue | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |