Documentation Center 
Write input sample to MATLAB workspace when triggered
The Triggered To Workspace block creates a matrix or array variable in the MATLAB^{®} workspace, where it stores the acquired inputs at the end of a simulation. The block overwrites an existing variable with the same name.
When you set the Save 2D signals as parameter to 2D array (concatenate along first dimension, the block saves an MbyN input as a PbyN matrix, where P is the Maximum number of rows parameter. When the simulation progresses long enough for the block to acquire more than P samples, the block stores only the most recent P samples. The Decimation factor, D, allows you to store only every Dth input matrix.
When you set the Save 2D signals as parameter to 3D array (concatenate along third dimension, the block saves an MbyN input as a threedimensional array in which each MbyN page represents a single sample from each of the M*N channels (the most recent input matrix occupies the last page). The maximum size of this variable is limited to MbyNbyP, where P is the Maximum number of rows parameter. When 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. You specify the triggering event at input 2 in the Trigger type popup menu:
Rising edge triggers execution of the block when the trigger input rises from a negative value to zero or a positive value, or from zero to a positive value.
Falling edge triggers execution of the block when the trigger input falls from a positive value to zero or a negative value, or from zero to a negative value.
Either edge triggers execution of the block when either a rising or falling edge (as described above) occurs.
To save a record of the sample time corresponding to each sample value, open the Configuration Parameters dialog box. In the Select pane, click Data Import/Export. In the Save to workspace section, select the Time check box.
The nontriggered version of this block is the Signal To Workspace block.
The type of event that triggers the block's execution.
The name of the workspace variable in which to store the data.
The maximum number of rows (one row per time step) to be saved, P.
The decimation factor, D.
Specify whether the block saves 2D signals as a 2D or 3D array in the MATLAB workspace:
2D array (concatenate along first dimension) — When you select this option, the block vertically concatenates each MbyN matrix input with the previous input to produce a 2D output array.
3D array (concatenate along third dimension) — When you select this option, the block saves an MbyN input signal as a 3D array. The maximum size of this 3D array is limited to MbyNbyP, where P is the Maximum number of rows parameter. When the simulation progresses long enough for the block to acquire more than P inputs, the block stores only the last P inputs. The Decimation factor, D, allows you to store only every Dth input matrix.
Select to log fixedpoint data to the MATLAB workspace as a FixedPoint Designer™ fi object. Otherwise, fixedpoint data is logged to the workspace as double.
Port  Supported Data Types 

Input 

Trigger 

Signal From Workspace  DSP System Toolbox 
Signal To Workspace  DSP System Toolbox 
To Workspace  Simulink 
Triggered Signal From Workspace  DSP System Toolbox 