find
Class: slreq.ReqSet
Namespace: slreq
Find requirements in requirement set that have matching attribute values
Syntax
myReq = find(rs, 'PropertyName', 'PropertyValue')
Description
finds and returns an myReq
= find(rs
, 'PropertyName'
, 'PropertyValue'
)slreq.Requirement
object
myReq
in the requirement set rs
specified by
the properties matching PropertyName
and
PropertyValue
. Property name matching is
case-insensitive.
Input Arguments
Output Arguments
Examples
Find Requirements That Have Matching Attribute Values
% Load a requirement set file rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx'); % Find all editable requirements in the requirement set allReqs = find(rs, 'Type', 'Requirement'); % Find all referenced requirements in the requirement set allRefs = find(rs, 'Type', 'Reference'); % Find all requirements with a certain ID matchedReqs = find(rs, 'ID', 'R1.1');
Find Requirements by Using Regular Expression Matching
You can search for requirements in your requirement sets by constructing regular expression search patterns by using the tilde (~) symbol.
% Load a requirement set file rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx'); % Find all requirements that correspond to the controller controllerReqs = find(rs, 'Type', 'Requirement', 'Summary', '~Controller(?i)\w*') controllerReqs = 1×19 Requirement array with properties: Id Summary Keywords Description Rationale SID CreatedBy CreatedOn ModifiedBy ModifiedOn FileRevision Dirty Comments
Version History
Introduced in R2018a