addSymbol
Description
adds data to the Requirements
Table block, specified by data = addSymbol(reqTable)reqTable.
adds data by using one or more name-value arguments.data = addSymbol(reqTable,Name=Value)
Examples
Create a Requirements Table block and retrieve the
RequirementsTable object.
table = slreq.modeling.create("myModel");Add data to the block.
data = addSymbol(table);
Create a Requirements Table block and retrieve the
RequirementsTable object.
table = slreq.modeling.create("myModel");Add data to the block and specify the Name, Scope, and Type properties.
data = addSymbol(table,Name="u1",Scope="Output",Type="Single");
Input Arguments
Requirements Table block, specified as a
RequirementsTable object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: addSymbol(table,Complexity="Off") creates data and sets the
complexity of the data to Off.
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
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 of the data, specified as a string scalar or character vector.
Data Types: char | string
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 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
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
Output Arguments
Data, returned as a Symbol object.
Version History
Introduced in R2022a
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)