find
Class: slreq.Justification
Package: slreq
Syntax
childJusts = find(jt,'PropertyName1',PropertyValue1,...,'PropertyNameN',PropertyValueN)
Description
finds and returns child justifications childJusts
= find(jt
,'PropertyName1'
,PropertyValue1
,...,'PropertyNameN'
,PropertyValueN
)childJusts
of the parent
justification jt
that match the properties specified by
PropertyName
and PropertyValue
.
Input Arguments
jt
— Justification
slreq.Justification
object
Justification, specified as an slreq.Justification
object.
PropertyName
— Justification property
character vector
Justification property name, specified as a character vector. See the valid property
names in the Properties section of slreq.Justification
.
Example: 'Type','Keywords','SID'
PropertyValue
— Justification property value
character vector | character array | datetime
value | scalar | logical
| structure array
Justification 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.Justification
.
Output Arguments
childJusts
— Child justifications
slreq.Justification
object | slreq.Justification
object array
Child justifications, returned as slreq.Justification
objects.
Examples
Find Child Justifications
This example shows how to find child justifications that match property values.
Load the crs_req_justs
requirement file, which describes a cruise control system, and assign it to a variable. Find the justification with index 5
, as this justification has child justifications.
rs = slreq.load('crs_req_justs'); parentReq = find(rs,'Type','Justification','Index','5');
Find all the child justifications of parentReq
that were modified in revision 1
.
childReqs1 = find(parentReq,'FileRevision',1)
childReqs1=1×6 object
1x6 Justification array with properties:
Id
Summary
Description
Keywords
Rationale
CreatedOn
CreatedBy
ModifiedBy
IndexEnabled
IndexNumber
SID
FileRevision
ModifiedOn
Dirty
Comments
Index
Find all the child justifications of parentReq
that were modified in revision 1
and whose summary says Non-functional requirement
.
childReqs2 = find(parentReq,'FileRevision',1,'Summary','Non-functional requirement')
childReqs2 = Justification with properties: Id: '#72' Summary: 'Non-functional requirement' Description: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">...' Keywords: {} Rationale: '' CreatedOn: 27-Feb-2017 10:34:22 CreatedBy: 'itoy' ModifiedBy: 'asriram' IndexEnabled: 1 IndexNumber: [] SID: 72 FileRevision: 1 ModifiedOn: 03-Aug-2017 17:14:44 Dirty: 0 Comments: [0x0 struct] Index: '5.1'
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 R2018b
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)