find
Class: slreq.Requirement
Package: slreq
Find children of parent requirements
Syntax
childReqs = find(req,'PropertyName1',PropertyValue1,...,'PropertyNameN',PropertyValueN)
Description
finds and returns child requirements childReqs
= find(req
,'PropertyName1'
,PropertyValue1
,...,'PropertyNameN'
,PropertyValueN
)childReqs
of the parent
requirement req
that match the properties specified by
PropertyName
and PropertyValue
.
Input Arguments
req
— Requirement
slreq.Requirement
object
Requirement, specified as an slreq.Requirement
object.
PropertyName
— Requirement property
character vector
Requirement property name, specified as a character vector. See the valid
property names in the Properties section of slreq.Requirement
.
Example: 'Type','Keywords','SID'
PropertyValue
— Requirement property value
character vector | character array | datetime
value | scalar | logical
| structure array
Requirement property value, specified as a character vector, character
array, datetime
value, scalar,
logical
, or structure array. The data type depends on the
specified propertyName
. See the valid property values
in the Properties section of slreq.Requirement
.
Output Arguments
childReqs
— Child requirements
slreq.Requirement
object | slreq.Requirement
object array
Child requirements, returned as slreq.Requirement
objects.
Examples
Find Child Requirements
This example shows how to find child requirements that match property values.
Load the crs_req_func_spec
requirement file, which describes a cruise control system, and assign it to a variable. Find the requirement with index 4
, as this requirement has child requirements.
rs = slreq.load('crs_req_func_spec'); parentReq = find(rs,'Type','Requirement','Index','4');
Find all the child requirements of parentReq
that were modified in revision 1
.
childReqs1 = find(parentReq,'FileRevision',1)
childReqs1=1×10 object
1x10 Requirement array with properties:
Type
Id
Summary
Description
Keywords
Rationale
CreatedOn
CreatedBy
ModifiedBy
IndexEnabled
IndexNumber
SID
FileRevision
ModifiedOn
Dirty
Comments
Index
Find all the child requirements of parentReq
that were modified in revision 1
and are Functional
type requirements.
childReqs2 = find(parentReq,'FileRevision',1,'Type','Functional')
childReqs2=1×10 object
1x10 Requirement array with properties:
Type
Id
Summary
Description
Keywords
Rationale
CreatedOn
CreatedBy
ModifiedBy
IndexEnabled
IndexNumber
SID
FileRevision
ModifiedOn
Dirty
Comments
Index
Cleanup
Clear the open requirement sets and link sets, and close the open models without saving changes.
slreq.clear;
bdclose all;
Version History
Introduced in R2018a
See Also
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
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.
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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)