DSP Blockset | ![]() ![]() |
Write the input sample to the workspace when triggered.
Library
Description
The Triggered To Workspace block creates a matrix or array variable in the workspace, where it stores the acquired inputs at the end of a simulation. An existing variable with the same name is overwritten.
For an M-by-N frame-based input, the block creates an N-column workspace matrix in which each group of M rows represents a single input frame from each of N channels (the most recent frame occupying the last M rows). The maximum size of this workspace variable is limited to P-by-N, where P is the Maximum number of rows parameter. (If the simulation progresses long enough for the block to acquire more than P samples, it stores only the most recent P samples.) The Decimation factor, D, allows you to store only every Dth input frame.
For an M-by-N sample-based input, the block creates a three-dimensional array in which each M-by-N page represents a single sample from each of M*N channels (the most recent input matrix occupying the last page). The maximum size of this variable is limited to M-by-N-by-P, where P is the Maximum number of rows parameter. (If the simulation progresses long enough for the block to acquire more than P inputs, it stores only the last P inputs.) The Decimation factor, D, allows you to store only every Dth input matrix.
The block acquires and buffers a single frame from input 1 whenever it is triggered by the control signal at input 2 (). At all other times, the block ignores input 1. The triggering event at input 2 is specified by the Trigger type pop-up menu, and can be one of the following:
To save a record of the sample time corresponding to each sample value, check the Time box in the Save to workspace parameters list of the Simulation Parameters dialog. You can access these parameters by selecting Parameters from the Simulation menu, and clicking on the Workspace I/O tab.
The nontriggered version of this block is To Workspace.
Dialog Box
Supported Data Types
To learn how to convert to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.
See Also
Signal From Workspace |
DSP Blockset |
To Workspace |
Simulink |
See Exporting Signals for related information.
![]() | Triggered Signal From Workspace | Two-Channel Analysis Subband Filter | ![]() |