Main Content

inLinks

Class: slreq.Reference
Package: slreq

Get incoming links for referenced requirements

Syntax

myLinks = inLinks(ref)

Description

myLinks = inLinks(ref) returns the incoming links for the referenced requirement ref.

Input Arguments

expand all

Referenced requirement, specified as a slreq.Reference object.

Output Arguments

expand all

Incoming links for the requirement, returned as an slreq.Link array.

Examples

expand all

This example shows how to get incoming and outgoing links for referenced requirements.

Open the Requirements Definition for a Cruise Control Model project. Load the crs_req requirement set.

slreqCCProjectStart;
rs = slreq.load("crs_req");

Find the requirement with the index 2.1.2.

ref1 = find(rs,Index="2.1.2");

Get the incoming links for the requirement.

myInLinks = inLinks(ref1);

Find the requirement with the index 3.1.

ref2 = find(rs,Index="3.1");

Get the outgoing links for the requirement.

myOutLinks = outLinks(ref2);

Tips

Alternative Functionality

App

You can also use the Requirements Editor to view incoming links. Select a referenced requirement. In the right pane, under Links, the incoming links icon indicates incoming links.

Version History

Introduced in R2017b