The Traceability Matrix allows you to easily view requirements and their links to other items in a compact format. The Traceability Matrix summarizes requirements, links, model or test entities, data dictionaries, and code, and allows you to navigate to link sources or destinations. For example, you can:
Identify items that are missing links.
Identify incorrect links.
Display requirements that are linked to model elements.
Inspect links by navigating to their sources or destinations.
Filter by requirement type, link type, or model hierarchy.
Confirm model and requirement completeness.
View and clear change issues.
For large artifacts, you can focus on specific items and their associated requirements by expanding or collapsing the content in the Traceability Matrix, or by focusing the display on a specific item. Additionally, you can filter out specific parts of the matrix to see only what you need to see.
You can open the Traceability Matrix window from the Requirements Editor or a Simulink® model. From the Requirements Editor, click Report > Generate Traceability Matrix. From a Simulink model, in the Requirements tab, select Share > Open Requirements Traceability Matrix.
To create a Traceability Matrix:
In the Traceability Matrix window, click Add.
Select your artifacts.
The following artifacts can be used to create a Traceability Matrix:
Simulink Requirements™ requirement set
System Composer™ model
Simulink Test™ test file
Simulink data dictionary
In order for an artifact to appear as an option in the drop-down menu, the artifact must:
Be loaded in your MATLAB workspace
Have links associated with it
Be authored in MATLAB
Click Generate Matrix.
The artifacts in the image below are a requirement set and a Simulink model. The requirements are listed on the left, while the blocks of the Simulink model are listed on the top.
If you make changes to your artifacts, click Update to refresh your Traceability Matrix.
The Traceability Matrix is a grid where the rows correspond to items from the left artifact and the columns correspond to items from the top artifact. The arrow icon in a cell indicates that there is a link between the item in that row and column. The arrow icon points from the source item to the destination item.
When you click an arrow icon, you see information about the link.
Initially, some rows and columns in your matrix may be collapsed. The expand icon indicates that a link exists in the row and column, but you need to expand the row and/or column to see the link.
When you click the expand icon, you see the left and top items corresponding to that cell.
When you click on the items in the dialog box, the item opens in the associated application for that artifact type. For example, if you click on a requirement, the Requirements Editor window opens and displays the specified requirement.
You can choose to show the hierarchy of a specific item in your Traceability Matrix. Right click on the artifact whose hierarchy you want to display. Click Focus the display.
Your Traceability Matrix now only shows the selected part of the hierarchy. To show the entire hierarchy of the artifact, right click the artifact again and click Display Entire Hierarchy.
To expand the hierarchy of an artifact, right click on the artifact whose hierarchy you want to expand, and click Expand All. To collapse the hierarchy of an artifact, right click on the artifact whose hierarchy you want to collapse and click Collapse All.
You can use the Filter Panel to display rows, columns, or cells with specific properties. You can apply filters to the items in the top artifact, the items in the left artifact, or the cells. If you apply a filter to an artifact, some rows or columns might be omitted. If you apply a filter to the cells, some links in the cells might be omitted.
For example, if, under Top, you click Missing Links, the Traceability Matrix only shows columns without links. If, under Cell, you click With Change Issues, the Traceability Matrix only shows links in cells that have change issues.
When you add a filter to the Traceability Matrix to the left or top artifacts of the Traceability Matrix, the filter appears at the top of the matrix next to the artifact name.
To highlight cells in your Traceability Matrix that are missing links, click Missing Links. The items in your Traceability Matrix without links are highlighted in yellow.
If you collapse a hierarchy, the highlighting is only applied to the top item in the hierarchy. View the hierarchy for the entire Traceability Matrix to see all items with missing links. See Artifact Hierarchy.
Create a link by clicking on a cell, then click Create in the dialog box or Create Link in the toolstrip to create a link between the item in the row and the item in the column.
The Create Link window automatically populates the link source and destination. You can reverse the link source and destination by clicking the reverse button .
If you create a Traceability Matrix using the same requirement set for the left and top artifact, you cannot create a link where the source and destination items are the same requirement. You also cannot create a link where the source or destination item is the requirement set.
Remove a link by clicking on a cell containing a link, and, in the toolstrip, clicking Remove Links. The Remove Links dialog box appears and shows the link artifacts, type, and label. Click Remove to remove the link.
A link has a change issue if there is a change to the requirement associated with the link. To learn how to enable change tracking and use the Requirements Editor to view and clear change issues, see Track Changes to Requirement Links.
You can view links with change issues in the Traceability Matrix by applying the With Change Issues filter, or by selecting Highlight Missing Links > Show Changed Links Only. You can highlight links with change issues by clicking Highlight Missing Links > Highlight Changed Links. The row, column, and cell corresponding to the link with a change issue is highlighted in red.
To clear a change issue for a link, select the cell containing the link and, in the toolstrip, click Clear Change Issue.
Create a rectangular cell selection by clicking and dragging, or by pressing Shift and clicking the cells. You can press Ctrl and click to toggle cells in the rectangular selection or create a selection of individual cells.
You can add, remove, or clear change issues for multiple links at a time when you select multiple cells.
You can export the Traceability Matrix as an HTML report or as a MATLAB variable that contains the table data.
Generate the HTML report by clicking Export > Generate HTML Report. You will be prompted to name and save the report. The report automatically opens after it is saved.
The HTML report is not interactive. Create the view that you want to export by focusing the display, collapsing or expanding hierarchies, or applying filters and highlighting. The file path to the artifacts in the matrix are listed in the HTML report. The focused display, applied filters, and highlighting are also listed.
Create a MATLAB variable that contains the table data by clicking Export > Create MATLAB Variable. The variable
slrtmxData is created in the base
MATLAB workspace. If you have an existing variable
slrtmxData in your workspace, it will be
The exported MATLAB variable is not interactive, but has all the functionality of a MATLAB table. See Tables. Create the view that you want to export by focusing the display or applying filters. If you collapse items in the hierarchy, they are still exported. Highlighting is not exported.
Unresolved links are not displayed in the Traceability Matrix.
The Traceability Matrix does not support MATLAB