帮助中心帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
类: slreq.ReqSet 命名空间: slreq
获取需求集集中的顶级项目
reqs = children(rs)
reqs = children(rs) 返回需求集rs 中的顶级项目。这些项目可以是需求、引用需求或者申述。
reqs
rs
全部展开
slreq.ReqSet
需求集,指定为 slreq.ReqSet 对象。
slreq.Requirement
slreq.Reference
slreq.Justification
需求集集中的顶级项目,以 slreq.Requirement、slreq.Reference 或 slreq.Justification数组的数组返回。
此示例显示如何获取需求集集中的顶级项目。
打开 ShortestPath 工程。加载shortest_path_func_reqs需求集。
ShortestPath
shortest_path_func_reqs
openProject("ShortestPath"); rs = slreq.load("shortest_path_func_reqs");
获取需求集的顶级项目。
topItems = children(rs)
topItems=1×2 Requirement array with properties: Type Id Summary Description Keywords Rationale CreatedOn CreatedBy ModifiedBy IndexEnabled IndexNumber SID FileRevision ModifiedOn Dirty Comments Index
要获取某个需求的子需求,请使用 slreq.Requirement 的 children 方法。要获取引用需求,请使用 slreq.Reference 的 children 方法。要获取某个申述的子申述,请使用 slreq.Justification 的 children 方法。
children
在 R2017b 中推出
slreq.ReqSet | slreq.Reference | slreq.Requirement | slreq.Justification
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office