Main Content

RequirementsTable

Configure Requirements Table blocks

Description

Use RequirementsTable objects to configure Requirements Table blocks.

Creation

There are several ways to create a RequirementsTable object:

Properties

expand all

Name of the Requirements Table block, specified as a string scalar or character vector.

Example: table.Name = "tableName" changes the block name to tableName

Data Types: char | string

This property is read-only.

Path of the Requirements Table block, specified as a string scalar or character vector.

Data Types: char | string

Requirements Table block headers, specified as a structure array. Specify headers to add under the Precondition, Postcondition, and Action columns in the Requirements tab by setting the Preconditions, Postconditions, and Actions fields to a string vector or cell array of character vectors. Use a cell array to add multiple columns under the Precondition, Postcondition, and Action columns.

Example: table.RequirementHeaders.Preconditions = ["u1","",""] changes the Precondition column header where one header is u1 and the other two are empty.

Data Types: struct

Object Functions

addRequirementRowAdd requirement to Requirements Table block
addAssumptionRowAdd assumption to Requirements Table block
addSymbolAdd data to Requirements Table block
clearClear row in Requirements Table block
getAssumptionRowsRetrieve assumptions in Requirements Table block
getRequirementRowsRetrieve requirements in Requirements Table block
findSymbolRetrieve data in Requirements Table block
hideAssumptionColumnHide Precondition column in Assumptions tab
hideRequirementColumnHide columns in Requirements tab
removeRowRemove Requirements Table block row
showAssumptionColumnShow Precondition column in Assumptions tab
showRequirementColumnShow columns in Requirements tab

Examples

collapse all

Create a new model called myModel that contains a Requirements Table block.

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

Change the name of the block to newTableName.

table.Name = "newTableName";

Create a new model called myModel that contains a Requirements Table block.

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

Specify three Precondition columns with empty headers.

table.RequirementHeaders.Preconditions = ["","",""];

Specify two Postcondition columns where one header is u1 and the other is empty.

table.RequirementHeaders.Postconditions = ["u1",""];

Specify two Action columns with the headers u2 and u3.

table.RequirementHeaders.Actions = ["u2","u3"];

Version History

Introduced in R2022a