Class: slreq.Reference
Package: slreq
Find referenced requirements
refs = find(rs, 'Type', 'Reference', 'PropertyName', PropertyValue)
finds and returns a referenced requirement or a set of referenced requirements
refs
= find(rs
, 'Type'
, 'Reference'
, 'PropertyName'
, PropertyValue
)refs
in the requirements set rs
specified by
the properties matching PropertyName
and
PropertyValue
. Property name matching is
case-insensitive.
% Load a requirement set file rs = slreq.load('C:\MATLAB\My_Requirement_Set_1.slreqx'); % Find all referenced requirements with Id R10 in the requirement set matchedRefs = find(rs, 'Type', 'Reference', 'Id', 'R10') matchedRefs = Reference with properties: Keywords: [0×0 char] Artifact: 'Req_doc.docx' Id: 'R10' Summary: 'System overview' Description: '' SID: 3 Domain: 'linktype_rmi_word' SynchronizedOn: 23-Jul-2017 12:47:23
You can search for referenced requirements in your requirements sets by constructing regular expression search patterns by using the tilde (~) symbol.
% Load a requirement set file rs = slreq.load('C:\MATLAB\My_Requirement_Set_1.slreqx'); % Find all referenced requirements that correspond to subsystems subsystemReqs = find(rs, 'Type', 'Reference', 'Description', '~Subsystems(?i)\w*') subsystemReqs = 1×40 Reference array with properties: Keywords Artifact Id Summary Description SID Domain SynchronizedOn ModifiedOn