Main Content

addFilterToHighlight

Add highlighting to traceability matrix configuration

Since R2024a

    Description

    addFilterToHighlight(configuration,filter) adds highlighting to the traceability matrix by applying the highlight filter, filter, to the traceability matrix configuration, configuration.

    example

    Examples

    collapse all

    This example shows how to highlight items in a traceability matrix by adding filters to a saved traceability matrix view.

    Open the project and get the traceability matrix configuration from the matrix options.

    openProject("CruiseRequirementsExample");
    view = slreq.getTraceabilityMatrixOptions(fullfile("data","crs_req_tm_view.json"));
    configuration = view.options;

    Create a highlight filter for missing links and add the filter to the configuration.

    noLinkFilter = slreq.matrix.Filter;
    noLinkFilter.Group ="Highlight";
    noLinkFilter.Type ="HasNoLink";
    addFilterToHighlight(configuration,noLinkFilter);

    Add the matrix artifacts and generate the updated traceability matrix.

    configuration.LeftArtifacts = fullfile("documents","crs_req_func_spec.slreqx");
    configuration.TopArtifacts = fullfile("models","crs_controller.slx");
    slreq.generateTraceabilityMatrix(view);

    Input Arguments

    collapse all

    Traceability matrix configuration to add filter to, specified as an slreq.matrix.Configuration object.

    Traceability matrix filter to add to configuration, specified as an slreq.matrix.Filter object.

    Version History

    Introduced in R2024a