Main Content

children

Class: slreq.Requirement
Namespace: slreq

Find child requirements of a requirement

Syntax

childReqs = children(req)

Description

childReqs = children(req) returns the child requirements childReqs of the slreq.Requirement object req.

Input Arguments

expand all

Requirement specified as an slreq.Requirement object.

Output Arguments

expand all

The child requirements belonging to the requirement req, returned as slreq.Requirement objects.

Examples

expand all

  1. Load a requirement set file and add three new requirements.

    rs = slreq.load("C:\MATLAB\My_Requirements_Set_1.slreqx");
    req1 = add(rs,"Id","5","Summary","Additional Requirement");
    req2 = add(req1,"Id","5.1","Summary","Additional Child Requirement 1");
    req3 = add(req1,"Id","5.2","Summary","Additional Child Requirement 2");
  2. Find the children of req1.

    childReqs = children(req1)
    childReqs = 
    
      1×2 Requirement array with properties:
    
        Id
        Summary
        Keywords
        Description
        Rationale
        SID
        CreatedBy
        CreatedOn
        ModifiedBy
        ModifiedOn
        FileRevision
        Comments
    

Tips

  • To get the top-level items in a requirement set, use the children method of slreq.ReqSet. To get the child referenced requirements of a referenced requirement, use the children method of slreq.Reference. To get the child justifications of a justification, use the children method of slreq.Justification.

Version History

Introduced in R2018a