主要内容

本页采用了机器翻译。点击此处可查看英文原文。

findRequirementRow

RequirementsTable 对象中查找行

自 R2026a 起

说明

row = findRequirementRow(table,index) 返回表 table 中索引为 index 的 Requirements Table 模块行。

示例

row = findRequirementRow(table,summary) 返回表 table 中包含摘要数据 summary 的 Requirements Table 模块行。

示例

示例

全部折叠

本示例演示了如何在 RequirementsTable 对象中查找具有特定索引或摘要的行。

加载模型。

model = "spec_model_final";
load_system(model);

获取模型中 Requirements Table 模块 (Cmd_Determination) 对应的 RequirementsTable 对象。

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

查找索引为 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'

查找摘要为 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'

输入参数

全部折叠

Requirements Table 模块,指定为 RequirementsTable 对象。

需求行索引,指定为字符串标量或字符向量。

数据类型: char | string

需求行摘要,指定为字符串标量或字符向量。

数据类型: char | string

输出参量

全部折叠

Requirements Table 模块行,以 RequirementRow 对象形式返回。

版本历史记录

在 R2026a 中推出