Engee documentation

To Workspace

Write the data to the workspace.

to workspace

Description

The To Workspace block writes its input values to the workspace. The recorded data is written to the workspace when the simulation ends. The To Workspace block supports scalars (single numbers), vectors (ordered sets of numbers), and matrices (arrays of numeric values).

When data is unloaded using the To Workspace block, variables of type WorkspaceArray 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

Port_1 - data to be written to the workspace
scalar | vector | matrix

Input port that receives data to be registered in the workspace.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Support for complex numbers: Yes

Parameters

Main

Variable name - name of the variable for the data to be saved
workspace_out (by default) | string

The name of the variable containing the written data. By default, the To Workspace block stores the written data in a variable named workspace_out. If the model contains several To Workspace blocks, the value of the Variable name parameter for each block must be unique.

The specified variable name is displayed on the block icon.

Usage in program code

Block parameter

VariableName

Variable value

valid variable name

By default

workspace_out