Main Content

setHierarchical

Class: slreq.Justification
Namespace: slreq

Change hierarchical justification status

Syntax

setHierarchical(jt,tf)

Description

setHierarchical(jt,tf) changes the hierarchical justification status of the slreq.Justification object jt as specified by the Boolean tf.

Input Arguments

expand all

Justification, specified as an slreq.Justification object.

The hierarchical justification status of the slreq.Justification object, specified as a Boolean.

Examples

expand all

  1. Load a requirement set file and find justification objects.

    rs = slreq.load("C:\MATLAB\My_Requirements_Set_1.slreqx");
    justs = find(rs,"Type","Justification")
    
    justs = 
    
      1×10 Justification array with properties:
    
        Id
        Summary
        Description
        Keywords
        Rationale
        CreatedOn
        CreatedBy
        ModifiedBy
        SID
        FileRevision
        ModifiedOn
        Dirty
        Comments
    
  2. Check if the first justification in justs is hierarchically justified.

    tf = isHierarchical(justs(1))
    
    tf = 
      
      logical
    
       0
  3. Change the first justification in justs to be hierarchically justified.

    setHierarchical(justs(1),true);

Version History

Introduced in R2018b