主要内容

findRequirementRow

Find rows in RequirementsTable object

Since R2026a

Description

row = findRequirementRow(table,index) returns the Requirements Table block row in the table, table, that has the index, index.

example

row = findRequirementRow(table,summary) returns the Requirements Table block row in the table, table, that has the summary, summary.

example

Examples

collapse all

This example shows how to find a row with a specific index or summary in a RequirementsTable object.

Load the model.

model = "spec_model_final";
load_system(model);

Get the RequirementsTable object for the Requirements Table block, Cmd_Determination, in the model.

table = slreq.modeling.find(model,"Cmd_Determination");

Find the requirement with the index 2.2.1.

reqRow1 = findRequirementRow(table,"2.2.1")
reqRow1 = 
  RequirementRow with properties:

            Actions: {'0'  ''}
           Duration: ''
    ChildEvaluation: 'independent'
            RowType: 'normal'
              Index: '2.2.1'
      Preconditions: {''  ''  '[phi_neg_norm, phi_pos_norm]'}
     Postconditions: {''}
            Summary: 'Roll_Angle_Phi greater than neg_norm and less than pos_norm'

Find the requirement with the summary Roll_Angle_Phi less than -30.

reqRow2 = findRequirementRow(table,"Roll_Angle_Phi less than -30")
reqRow2 = 
  RequirementRow with properties:

            Actions: {'TK_neg_extreme'  ''}
           Duration: ''
    ChildEvaluation: 'independent'
            RowType: 'normal'
              Index: '2.2.3'
      Preconditions: {''  ''  ' < phi_neg_extreme'}
     Postconditions: {''}
            Summary: 'Roll_Angle_Phi less than -30'

Input Arguments

collapse all

Requirements Table block, specified as a RequirementsTable object.

Requirement row index, specified as a string scalar or character vector.

Data Types: char | string

Requirement row summary, specified as a string scalar or character vector.

Data Types: char | string

Output Arguments

collapse all

Requirements Table block row, returned as a RequirementRow object.

Version History

Introduced in R2026a