Main Content

isFilteredIn

Class: slreq.Justification
Namespace: slreq

Check filtered justifications

Since R2022b

Syntax

tf = isFilteredIn(jt)

Description

tf = isFilteredIn(jt) checks if the justification, jt, is filtered in the Requirements Editor or Requirements Perspective and returns 1 if the justification is not filtered and 0 if the justification is filtered.

Input Arguments

expand all

Justification, specified as an slreq.Justification object.

Examples

expand all

This example shows how to check if a justification is filtered.

Load the crs_req_justs requirement set.

rs = slreq.open("crs_req_justs");

Find the justification with Index set to 5.

jt = find(rs,Index=5);

Check if the justification is filtered.

tf = isFilteredIn(jt)
tf = logical
   1

Create a filter called ContainerReqs. Use the ReqFilter property to define a filter that displays only requirements with Type set to Container.

myView = slreq.View.create("ContainerReqs");
myView.ReqFilter = "{'ReqType','Container'};"
myView = 
  View with properties:

          Name: 'ContainerReqs'
     ReqFilter: '{'ReqType','Container'};'
    LinkFilter: ''
          Host: ''

Apply the filter, then check if the justification is filtered.

activate(myView)
tf = isFilteredIn(jt)
tf = logical
   0

Tips

  • To check if a requirement is filtered, use the isFilteredIn method of slreq.Requirement. To check if a referenced requirement is filtered, use the isFilteredIn method of slreq.Reference. To check if a link is filtered, use the isFilteredIn method of slreq.Link.

Version History

Introduced in R2022b