Main Content


Class: slreq.Link
Package: slreq

Get link source artifact


src = source(myLink)


src = source(myLink) returns the source artifact src of the link myLink.

Input Arguments

expand all

Link, specified as an slreq.Link object.

Output Arguments

expand all

The link source artifact, returned as a MATLAB® structure.


Get Link Source

% Load a requirement set file and select one link
rs = slreq.load('C:\MATLAB\My_Req_Set.slreqx');
allReqs = find(rs, 'Type', 'Requirement');
req = allReqs(1);
allIncomingLinks = inLinks(req);
myLink = allIncomingLinks(1);

% Get link source
mySource = source(myLink)

mySource = 

  struct with fields:

      domain: 'linktype_rmi_simulink'
    artifact: 'controller_model.slx'
          id: ':241'
Introduced in R2018a