addAssumptionRow
Syntax
Description
adds an assumption to the Requirements
Table block, specified by AssumptionRow
= addAssumptionRow(reqTable
)reqTable
.
adds an assumption by using one or more name-value arguments.AssumptionRow
= addAssumptionRow(reqTable
,Name=Value
)
Examples
Add an Assumption to a Requirement Table Block
Create a Requirements Table block and retrieve the
RequirementsTable
object.
table = slreq.modeling.create("myModel");
Add an assumption to the block.
row = addAssumptionRow(table);
Add an Assumption with a Precondition and Postcondition
Create a Requirements Table block and retrieve the
RequirementsTable
object.
table = slreq.modeling.create("myModel");
Add an assumption to the block with expressions in the Precondition and Postcondition columns.
row = addAssumptionRow(table, Preconditions={'u1 > 1'},... Postcoditions={'y1 > 0'});
Input Arguments
reqTable
— Requirements Table block
RequirementsTable
object
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: addAssumptionRow(table,rowType="normal",Preconditions={'u1 >
0'})
adds an assumption to a Requirements Table block with a
precondition u1 > 0
.
Preconditions
— Precondition expression
{''}
(default) | cell array of character vectors
Precondition expression, specified as a cell array of character vectors. For more information on preconditions in assumptions, see Add Assumptions to Requirements.
Data Types: char
| cell
Postconditions
— Postcondition expression
{''}
(default) | cell array of character vectors
Postcondition expression, specified as a cell array of character vectors. For more information on postconditions in assumptions, see Add Assumptions to Requirements.
Data Types: char
| cell
rowType
— Assumption type
"normal"
(default) | "anyChildActive"
| "allChildrenActive"
Assumption type, specified by one of these values:
Value | Description |
---|---|
"normal" | Creates a normal assumption with all of the available properties. |
"anyChildActive" | Creates an Any Child Active semantic assumption. The parent assumption cannot have a precondition, and the children cannot have a postcondition. |
"allChildrenActive" | Creates an All Child Active semantic assumption. The parent assumption cannot have a precondition, and the children cannot have a postcondition. |
You can create normal assumptions or semantic assumptions. For more information on semantic requirements and assumptions, see Specify Row Type in Requirements Table Blocks. If you do not include this name-value pair, the function creates a normal assumption.
Data Types: enumerated
Summary
— Assumption summary text
""
(default) | string scalar | character vector
Assumption summary text, specified as a string scalar or character vector. Use this name-value argument to add text to the Summary column in the Assumptions tab of the Requirements Table block.
Data Types: char
| string
Output Arguments
AssumptionRow
— Assumption
AssumptionRow
object
Assumption, returned as an AssumptionRow
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.
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 (한국어)