Model Comparison

Compare XML text versions of models to identify changes in a model or differences between models

Examples and How To

Select Simulink Models for XML Comparison

Select files to compare from the Editor, the Current Folder browser, Simulink® Project, the Comparison tool, or using the visdiff function, change comparison type, and try examples.

Compare Simulink Model XML Files

Review and merge changes, display original models, filter and save comparison results.

Display Items in Original Models

Control highlighting of differences in original models, and view changes in model configuration parameters.

Merge Simulink Models from the Comparison Report

Resolve conflicts using three-way model merge, two-way merge, and by merging MATLAB® Function block code.

Export, Print, and Save XML Comparison Results

Archive comparison reports in printable reports or zip files, or export results to the workspace.

Compare XML from Models Managed with Subversion

Customize external source control to use MATLAB for comparison and merge.

Compare Project or Model Templates

Compare model or project templates (SLTX files) and create a comparison report.


About Simulink Model XML Comparison

Learn about selecting a pair of Simulink models to compare their XML files, explore the differences, view the changes highlighted in the original models, and merge differences.

How the Matching Algorithm Works

The XML comparison tool compares the XML files using the "Chawathe" algorithm, as described in the paper:

Change Detection in Hierarchically Structured Information, Sudarshan Chawathe, Anand Rajaraman, and Jennifer Widom; SIGMOD Conference, Montreal, Canada, June 1996, pp. 493-504.

Comparing XML Files from Models with Identical Names

Understand how Simulink creates temporary copies to have two models of the same name in memory at the same time, and how to control prompts to close files.

Work with Referenced Models and Library Links

The XML comparison report does not include changes to any referenced models or linked libraries. To examine your whole hierarchy, use a Simulink Project instead.

Was this topic helpful?