Main Content


Create traceable links



myLink = slreq.createLink(src, dest) creates an slreq.Link object myLink that serves as a link between the source artifact src and the destination artifact dest.


collapse all

This example shows how to create a link.

Create a link between the currently selected Simulink® block and a requirement req.

link1 = slreq.createLink(gcb,req)
link1 = 

  Link with properties:

           Type: 'Implement'
    Description: 'Plant Specs'
       Keywords: [0×0 char]
      Rationale: ''
      CreatedOn: 02-Sep-2017 15:49:28
      CreatedBy: 'Jane Doe'
     ModifiedOn: 21-Oct-2017 11:34:12
     ModifiedBy: 'John Doe'
       Comments: [0×0 struct]

Input Arguments

collapse all

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

The link destination artifact, specified as a MATLAB structure.

Output Arguments

collapse all

The link between src and dest, specified as an slreq.Link object.

Version History

Introduced in R2018a