Symbol
Description
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
block.
Creation
There are several ways to create a Symbol
object:
Create new data in a Requirements Table block by using the
addSymbol
object function.Create new data interactively in the Requirements Table block, then get the associated
Symbol
object by using thefindSymbol
object function.
Properties
Complexity
— Whether data accepts complex values
"Off"
(default) | "On"
| "Inherited"
Whether the data accepts complex values, specified as one of these values:
Complexity | Description |
---|---|
"Inherited" | The data inherits complexity based on the Scope
property. Input and output data inherit complexity from the Simulink® signals connected to the associated input and output ports.
Local and parameter data inherit complexity from the parameter to which the
data is bound. |
"Off" | The data is a real number. |
"On" | The data is a complex number. |
Data Types: enumerated
isDesignOutput
— Whether data is design model output
false
or 0
(default) | true
or 1
Whether the data is a design model output, specified as a numeric or logical
1
(true
) or 0
(false
). This property applies only when the
Scope
property is Input
. For more
information, see Treat as design model output for analysis.
Data Types: logical
Name
— Name of data
"data"
(default) | string scalar | character vector
Name of the data, specified as a string scalar or character vector.
Data Types: char
| string
Scope
— Scope of data
"Input"
(default) | "Output"
| "Local"
| "Constant"
| "Parameter"
Scope of the data that specifies where the data resides in memory relative to the block, specified as one of these values:
Scope | Description |
---|---|
"Input" | The data is an input signal to a Requirements Table block. |
"Output" | The data is an output signal of a Requirements Table block. |
"Local" | The data is defined in the current block only. |
"Constant" | The data is a read-only constant value that is visible to the block. |
"Parameter" | 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. |
Data Types: enumerated
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 "–1"
, which
means that the size is inherited. For more information, see Inherit Size from Simulink (Simulink).
Data Types: char
| string
Type
— Data type
"Inherit: Same as Simulink"
(default) | "double"
| "single"
| "int8"
| ...
Data type, specified as:
"Inherit: Same as Simulink"
"double"
"single"
"half"
"int64"
"int32"
"int16"
"int8"
"uint64"
"uint32"
"uint16"
"uint8"
"boolean"
"string"
"fixdt(1,16,0)"
"fixdt(1,16,2^0,0)"
"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.
Data Types: enumerated
Examples
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 RequirementsTable
object.
table = slreq.modeling.find("myModel");
Retrieve the Symbol
objects from the block.
data = findSymbols(table);
Change the properties of the first Symbol
object in the
array.
data(1).Name = "u1"; data(1).Scope = "Output";
Version History
Introduced in R2022a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)