Configure data in Requirements Table blocks
Symbol objects represent the data in Requirements
Table blocks. Use
Symbol objects to configure the input, output,
parameter, local, and constant data in a Requirements Table
There are several ways to create a
Create new data in a Requirements Table block by using the
Create new data interactively in the Requirements Table block, then get the associated
Symbolobject by using the
Complexity — Whether data accepts complex values
"Off" (default) |
Whether the data accepts complex values, specified as one of these values:
|The data inherits complexity based on the |
|The data is a real number.|
The data is a complex number.
isDesignOutput — Whether data is design model output
0 (default) |
Whether the data is a design model output, specified as a numeric or logical
false). This property applies only when the
Scope property is
Input. For more
information, see Treat as design model output for analysis.
Name — Name of data
"data" (default) | string scalar | character vector
Name of the data, specified as a string scalar or character vector.
Scope — Scope of data
"Input" (default) |
Scope of the data that specifies where the data resides in memory relative to the block, specified as one of these values:
The data is an input signal to a Requirements Table block.
The data is an output signal of a Requirements Table block.
The data is defined in the current block only.
The data is a read-only constant value that is visible to the block.
The data resides in a variable of the same name in the MATLAB® workspace, the model workspace, or in the workspace of a masked subsystem that contains this block.
Size — Size of data
"-1" (default) | string scalar | character vector
Size of the data, specified as a string scalar or character vector. This property
must resolve to a scalar value or a MATLAB vector of values. The default value is
means that the size is inherited. For more information, see Inherit Size from Simulink (Simulink).
Type — Data type
"Inherit: Same as Simulink" (default) |
"int8" | ...
Data type, specified as:
"Inherit: Same as Simulink"
"Enum: <class name>"
"Bus: <object name>"
To modify the data type properties, use the Symbols pane and Property Inspector. For more information, see Set Data Types in Requirements Table Blocks.
Add Data to a Requirements Table Block
Create a new model called
myModel that contains a
Requirements Table block.
table = slreq.modeling.create("myModel");
Add data named
u1 to the block.
data = addSymbol(table,Name="u1");
Retrieve Data and Change It
From a model named
myModel that contains a Requirements
Table block, retrieve the
table = slreq.modeling.find("myModel");
Symbol objects from the block.
data = findSymbols(table);
Change the properties of the first
Symbol object in the
data(1).Name = "u1"; data(1).Scope = "Output";
Introduced in R2022a