Main Content

Export, Print, and Save Model Comparison Results

You can save model comparison results as reports or workspace variables. If you have not yet run a comparison analysis, see Select Models to Compare.

To save your comparison results in a report, in the Comparison toolstrip, select Publish and choose the report format: HTML, Word, or PDF.

Alternatively, you can publish a comparison report to a file using the visdiff function.

If you apply filters to the comparison results, the saved report contains only filtered results.

The report also shows side by side screenshots of the modified models. Starting in R2023a, you can disable screenshots in comparison reports. Before you publish the comparison results, in the Command Window, enter these commands.

s = settings().comparisons.slx.DisplayReportScreenshots;
s.TemporaryValue = false;

To export the comparison results to the MATLAB® base workspace, in the Comparison toolstrip, select Publish > Workspace Variable and specify the variable name.

Saving the model comparison results as a workspace variable creates an xmlcomp.Edits object in the workspace. The xmlcomp.Edits object contains information about the comparison, including file names, filters applied, and hierarchical nodes that differ between the two files.

To create an xmlcomp.Edits object at the command line without opening the Comparison Tool, enter this command.

edits = slxmlcomp.compare(modelname_A,modelname_B)

 More About xmlcomp.Edits Properties

See Also

|

Related Examples

More About