Main Content

addAssumptionRow

Add assumption to Requirements Table block

Since R2022a

Description

example

AssumptionRow = addAssumptionRow(reqTable) adds an assumption to the Requirements Table block, specified by reqTable.

AssumptionRow = addAssumptionRow(reqTable,Name=Value) adds an assumption by using one or more name-value arguments.

Examples

collapse all

Create a Requirements Table block and retrieve the RequirementsTable object.

table = slreq.modeling.create("myModel");

Add an assumption to the block.

row = addAssumptionRow(table);

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

collapse all

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.

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

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

Assumption type, specified by one of these values:

ValueDescription
"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 Add Semantic Rows. If you do not include this name-value pair, the function creates a normal assumption.

Data Types: enumerated

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

collapse all

Assumption, returned as an AssumptionRow object.

Version History

Introduced in R2022a