Main Content


Class: slreq.Requirement
Namespace: slreq

Check filtered requirements

Since R2022b


tf = isFilteredIn(req)


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

Input Arguments

expand all

Requirement, specified as an slreq.Requirement object.


expand all

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

Load the myAddRequirements requirement set.

rs ="myAddRequirements");

Find the requirement with Summary set to Input u.

req = find(rs,Summary="Input u");

Check if the requirement is filtered.

tf = isFilteredIn(req)
tf = logical

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_0_1'
     ReqFilter: '{'ReqType','Container'};'
    LinkFilter: ''
          Host: ''

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

tf = isFilteredIn(req)
tf = logical

Clear the loaded requirement sets and close the Requirements Editor.



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

Version History

Introduced in R2022b