MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
在 RequirementsTable 对象中查找行
RequirementsTable
自 R2026a 起
row = findRequirementRow(table,index)
row = findRequirementRow(table,summary)
row = findRequirementRow(table,index) 返回表 table 中索引为 index 的 Requirements Table 模块行。
row
table
index
示例
row = findRequirementRow(table,summary) 返回表 table 中包含摘要数据 summary 的 Requirements Table 模块行。
summary
全部折叠
本示例演示了如何在 RequirementsTable 对象中查找具有特定索引或摘要的行。
加载模型。
model = "spec_model_final"; load_system(model);
获取模型中 Requirements Table 模块 (Cmd_Determination) 对应的 RequirementsTable 对象。
Cmd_Determination
table = slreq.modeling.find(model,"Cmd_Determination");
查找索引为 2.2.1 的需求。
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 的需求。
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
需求行摘要,指定为字符串标量或字符向量。
RequirementRow
Requirements Table 模块行,以 RequirementRow 对象形式返回。
在 R2026a 中推出
slreq.Requirement
requirement
getRequirementRows
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处