| DSP Blockset | Search  Help Desk |
| Triggered Shift Register | See Also |
Buffer a sequence of inputs into a frame-based output.
Library
Buffers, in General DSPDescription
The Triggered Shift Register block acquires a collection of Mo input samples into a frame, where Mo is specified by the Register size parameter. The block buffers a single sample from input 1 whenever it is triggered by the control signal at input 2 (
). The newly acquired input sample is appended to the output frame (in the same simulation step) so that the new output overlaps the previous output by Mo-1 samples. Between triggering events the block ignores input 1 and holds the output at its last value.
The triggering event at input 2 is specified by the Trigger type pop-up menu, and can be one of the following:

Vector Inputs. Length-N sample vector inputs are buffered into a Mo-by-N matrix, where Mo is specified by the Register size parameter.

Matrix Inputs.
An M-by-N matrix input is treated as a single vector with M*N elements (channels). In other words, the matrix input u is reshaped to the vector input u(:).

Initial Conditions
The Triggered Shift Register block's buffer is initialized to the value specified by the Initial condition parameter. The block always outputs this buffer at the first simulation step (t=0). If the block's output is a vector, the Initial condition can be a vector of the same size, or a scalar value to be repeated across all elements of the initial output. If the block's output is a matrix, the Initial condition can be a matrix of the same size, a vector (of length equal to the number of matrix rows) to be repeated across all columns of the initial output, or a scalar to be repeated across all elements of the initial output. NoteDialog Box

See Also
Buffer