Contenu principal

sldiagviewer.Comparator.compareWithBaseline

R2026b

Compare diagnostic details with saved baseline

Since R2025a

    Description

    compBaseline = sldiagviewer.Comparator.compareWithBaseline(baselinePath,diagMsgStage) returns a structure compBaseline that contains the details of the diagnostics that are added or removed in diagMsgStage as compared to baselinePath, where diagMsgStage contains the diagnostic details generated during a model operation and baselinePath is the saved baseline file. For information on saving baselines, see sldiagviewer.DiagnosticReceiver.saveBaseline.

    example

    Examples

    Input Arguments

    collapse all

    Absolute path to the baseline file, specified as a string scalar or character vector.

    Example: "D:\Projects\Simulink\Systems\baseline_simulation.json"

    Data Types: string | char

    Diagnostic details of a model run-time operation, specified as a cell array of MSLDiagnostic objects. To get the diagnostic details of a model operation, use the getDiagnostics function.

    Data Types: cell

    Output Arguments

    collapse all

    Diagnostics that are added or removed when comparing diagnostic messages between two model operations, returned as a structure.

    Alternatives

    You can compare diagnostic messages using the Comparator available in the Diagnostic Viewer. For more information, see Compare Diagnostic Messages Between Model Simulations.

    Version History

    Introduced in R2025a