Main Content

slreq.generateTraceabilityMatrix

Create traceability matrix

Since R2021a

    Description

    example

    slreq.generateTraceabilityMatrix opens the Traceability Matrix window.

    example

    slreq.generateTraceabilityMatrix(opts) creates a traceability matrix with the artifacts specified by opts.

    Examples

    collapse all

    Open the Traceability Matrix window.

    slreq.generateTraceabilityMatrix

    Close the Traceability Matrix window.

    slreq.clear

    This example shows how to create an options structure for a traceability matrix, then generate a matrix using those options.

    Open the Requirements Definition for a Cruise Control Model project.

    openProject("ShortestPath");

    Create an options structure for a traceability matrix.

    opts = slreq.getTraceabilityMatrixOptions;

    Set the leftArtifacts and topArtifacts fields of opts. Enter a cell array containing the name of the artifacts that you want to use in your traceability matrix.

    opts.topArtifacts = ["shortest_path_func_reqs.slreqx","shortest_path_tests_reqs.slreqx"];
    opts.leftArtifacts = "graph_unit_tests";

    Generate the traceability matrix with the artifacts specified by opts.

    slreq.generateTraceabilityMatrix(opts)

    Input Arguments

    collapse all

    Traceability matrix options, specified as a struct with these fields:

    • leftArtifacts

    • topArtifacts

    • options

    Specify the leftArtifacts and topArtifacts fields of the struct as string arrays or cell arrays of character vectors.

    Version History

    Introduced in R2021a