User`s guide
Signal To Workspace
5-392
5Signal To Workspace
Purpose Write simulation data to an array in MATLAB’s main workspace.
Library DSP Sinks
Description The Signal To Workspace block writes data from your simulation into an array
in MATLAB’s main workspace. The output array can be 2-D or 3-D, depending
on whether the data is 1-D, sample-based, or frame-based. The Signal To
Workspace block and Simulink’s To Workspace block can output the same
arrays if their parameters are set appropriately.
For more information on the Signal To Workspace block, see the following
sections of this reference page:
•“Parameter Descriptions” on page 5-392
•“Output Dimension Summary” on page 5-393
•“Matching the Outputs of Signal To Workspace and To Workspace Blocks” on
page 5-394
•“Examples” on page 5-394
Parameter Descriptions
The Variable name parameter is the name of the array in the MATLAB
workspace into which the block logs the simulation data. The array is created
in the workspace only after the simulation stops running. If you enter the name
of an existing workspace variable, the block overwrites the variable with an
array of simulation data after the simulation stops running.
When the block input is sample-based or 1-D, the
Limit data points to last
parameter indicates how many samples of data to save. If the block input is
frame-based, this parameter indicates how many frames of data to save. If the
simulation generates more than the specified maximum number of samples or
frames, the simulation saves only the most recently generated data. To capture
all data, set
Limit data points to last to inf.
The
Decimation parameter is the decimation factor. It can be set to any
positive integer d, and allows you to write data at every dth sample. The
default decimation,
1, writes data at every time step.