To Workspace
Writes data to the workspace.
blockType: ToWorkspace
Path in the library:
|
Description
The To Workspace block records its input signal values in the workspace. The recorded data is written to the workspace when the simulation is completed. The To Workspace block supports scalars (single numbers), vectors (ordered sets of numbers), and matrices (arrays of numeric values).
When unloading data using the To Workspace block, variables of the WorkspaceArray type are obtained. To read data from variables of this type, use the block From Workspace.
The name of the variable is displayed on the block icon.
Ports
Input
#
IN_1
—
data to be written to the workspace
scalar | vector | matrix
Details
Input port that receives data to be registered in the workspace.
| Data types |
|
| Complex numbers support |
Yes |
Parameters
Main
#
Variable name —
name of the variable for the stored data
String
Details
The name of the variable containing the recorded data. By default block To Workspace saves the recorded data in a variable named workspace_out. If the model contains several blocks To Workspace, parameter value Variable name It must be unique for each block.
The specified variable name is displayed on the block icon.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Sample Time —
interval between calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between calculation steps as a non-negative number. To inherit the calculation step, set this parameter to −1.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |