MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
类: 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
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处