Main Content

children

Class: slreq.Requirement
Package: 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

Find Child Requirements

% Load a requirements 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');

% 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

Introduced in R2018a