Main Content

slreq.generateTraceabilityMatrix

Create traceability matrix

    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.

    slreqCCProjectStart;

    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.leftArtifacts = {'crs_req.slreqx','crs_req_func_spec.slreqx'};
    opts.topArtifacts = {'crs_plant.slx', 'crs_controller.slx','DriverSwRequest_Tests.mldatx'};

    Generate the traceability matrix with the artifacts specified by opts.

    slreq.generateTraceabilityMatrix(opts)

    Cleanup

    Clear the open requirement sets and link sets, and close the Traceability Matrix window.

    slreq.clear;

    Input Arguments

    collapse all

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

    • leftArtifacts

    • topArtifacts

    Version History

    Introduced in R2021a