Main Content

isRequirementRow

Class: slreq.Requirement
Namespace: slreq

Check if requirement is a row in a Requirements Table block

Since R2026a

Description

tf = isRequirementRow(req) checks if the requirement specified by req is a requirement row in a Requirements Table block.

example

Examples

expand all

This example shows how to check whether a requirement is a requirement row in a Requirements Table block and get the corresponding RequirementRow object.

Load the model to load the requirement set.

load_system("duration_column_example_model.slx");

Find the loaded requirements.

reqs = slreq.find("Type","Requirement")
reqs=1×3 Requirement array with properties:
    Type
    Id
    Summary
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedBy
    IndexEnabled
    IndexNumber
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments
    Index

Check whether the first requirement is a requirement row in a Requirements Table block.

isRequirementRow(reqs(1))
ans = logical
   1

Get the requirement row that corresponds to the first requirement.

requirementRow(reqs(1))
ans = 
  RequirementRow with properties:

            Actions: {'y = 1'}
           Duration: '2'
    ChildEvaluation: 'independent'
            RowType: 'normal'
              Index: '1'
      Preconditions: {'u >= 0'}
     Postconditions: {''}
            Summary: 'Requirement 1'

Input Arguments

expand all

Requirement, specified as an slreq.Requirement object.

Output Arguments

expand all

True or false result, returned as a 1 or 0 of data type logical.

Version History

Introduced in R2026a