find

Class: slreq.Justification
Package: slreq

Find justifications

Syntax

justs = find(rs, 'Type', 'Justification', 'PropertyName', PropertyValue)

Description

justs = find(rs, 'Type', 'Justification', 'PropertyName', PropertyValue) finds and returns a justification or a set of justifications justs in the requirements set rs specified by the properties matching PropertyName and PropertyValue. Property name matching is case-insensitive.

Input Arguments

expand all

Requirements set specified as an slreq.ReqSet object.

Output Arguments

expand all

Justifications, returned as slreq.Justification objects.

Examples

Find Justifications That Have Matching Attribute Values

% Load a requirement set file
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');

% Find a justification with Id J1.1 in the requirements set
matchedJust = find(rs, 'Type', 'Justification', 'Id', 'J1.1')

matchedJust = 

  Justification with properties:

              Id: 'J1.1'
         Summary: 'Justifications'
     Description: 'Non-functional requirement justifications'
        Keywords: [0×0 char]
       Rationale: ''
       CreatedOn: 27-Feb-2017 10:34:22
       CreatedBy: 'Jane Doe'
      ModifiedBy: 'John Doe'
             SID: 71
    FileRevision: 1
      ModifiedOn: 03-Aug-2018 17:14:16
           Dirty: 0
        Comments: [0×0 struct]

Find Justifications by Using Regular Expression Matching

Construct regular expression search patterns by using the tilde (~) symbol to find justifications in your requirement set.

% Load a requirement set file
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');

% Find all justifications that correspond to subsystems
subsystemJusts = find(rs, 'Type', 'Justification', 'Description', ...
'~Subsystems(?i)\w*')

subsystemJusts = 

  1×15 Justification array with properties:

    Id
    Summary
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedBy
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments
For more information on constructing regular expression search patterns, see Steps for Building Expressions (MATLAB).

See Also

Introduced in R2018b