MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
类: slreq.Requirement 命名空间: slreq
从需求中获取 Requirements Table 模块需求行
自 R2026a 起
row = requirementRow(req)
row = requirementRow(req) 返回与 req 指定的需求相对应的 Requirements Table 模块需求行,即 row。
row
req
示例
全部展开
本示例演示了如何检查一个需求是否是 Requirements Table 模块中的需求行,并获取相应的 RequirementRow 对象。
RequirementRow
加载模型以加载需求集。
load_system("duration_column_example_model.slx");
查找已加载的需求。
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
检查第一个需求是否是 Requirements Table 模块中的需求行。
isRequirementRow(reqs(1))
ans = logical 1
获取与第一个需求相对应的需求行。
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'
slreq.Requirement
需求,指定为 slreq.Requirement 对象。
Requirements Table 模块中的需求行,指定为 RequirementRow 对象。
如果需求 req 没有对应的 RequirementRow 对象,则该方法会返回一个错误。
在 R2026a 中推出
RequirementsTable
slreq.modeling.create
slreq.modeling.find
getRequirementRows
requirement
isRequirementRow
findRequirementRow
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处