Generate sequence of numbers from specified column vector
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.
|When the block needs a new output value after exhausting the data, it starts over at the beginning of the vector.|
|After exhausting the data, the block outputs the last data value for every sample time hit.|
|After exhausting the data, the block outputs the value |
|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.|
This block has a restricted set of valid connections to other blocks because the Event-Based Sequence block infers from a subsequent block when to generate a new random number.
The direct or indirect connections to signal input ports must have the multiplicities in the table.
|Type of Signal Input Port||Exact Number of Connections|
|Monitoring Ports||Arbitrary number|
|Ports of blocks that appear in Sink Blocks||Arbitrary number|
All indirect connections must be via blocks that have all of the following characteristics:
Appears in Computational Blocks
Has exactly one input signal
Has no function-call output signals
Tip For an indirect connection to the Atomic Subsystem block, the restrictions on input and output signals apply to the subsystem itself, not the blocks inside the subsystem.
This block has one signal output port for the numbers in the sequence. The initial output value is 0. This value is in effect from the start of the simulation until the first update by the block.
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.
The method for generating output after the block exhausts the data referenced in the Vector of output values parameter.