parent
类: slreq.Requirement
命名空间: slreq
查找需求的父项
语法
parentObj = parent(req)
输入参数
输出参量
示例
查找需求的父对象
% Load a requirement set file and add two new requirements rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx'); req1 = add(rs, 'Id', '5', 'Summary' , 'Additional Requirement'); req2 = add(req1, 'Id', '5.1', 'Summary' , 'Additional Child Requirement'); % Find the parent of req2 parentReq1 = parent(req2) parentReq1 = Requirement with properties: Id: '5' Summary: 'Additional Requirement' Keywords: [0×0 char] Description: '' Rationale: '' SID: 10 CreatedBy: 'John Doe' CreatedOn: 05-Oct-2007 16:09:38 ModifiedBy: 'Jane Doe' ModifiedOn: 21-Dec-2016 11:10:05 Comments: [0×0 struct] % Find the parent of req1 parentReq2 = parent(req1) parentReq2 = ReqSet with properties: Description: '' Name: 'My_Requirements_Set_1' Filename: 'C:\MATLAB\My_Requirements_Set_1.slreqx' Revision: 6 Dirty: 1 CustomAttributeNames: {}
版本历史记录
在 R2018a 中推出