To save a printable version of a model comparison report,
On the Comparison tab, select Publish > HTML, Word, or PDF.
The Save dialog box opens, where you can choose to save a printable version of the model comparison report.
Select a file name and location to save the report.
The report is a non-interactive document of the differences detected by the algorithm for printing, sharing, or archiving a record of the comparison. If you have applied filters, your filtered results appear in the printable report.
Alternatively, you can publish a comparison report to a file using the visdiff
function.
To export the comparison results to the MATLAB® base workspace,
On the Comparison tab, select Publish > Workspace Variable.
The Input Variable Name dialog box appears.
Specify a name for the export object in the dialog and click
OK. This action exports the results of the model comparison
to 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:
Edits = slxmlcomp.compare(modelname_A,modelname_B)
Property of xmlcomp.Edits | Description |
---|---|
Filters | Array of filter structure arrays. Each structure has two fields, Name and Value. |
LeftFileName | File name of left model. |
LeftRoot | xmlcomp.Node object that references the root of the left
tree. |
RightFileName | File name of right model. |
RightRoot | xmlcomp.Node object that references the root of the right
tree. |
TimeSaved | Time when results exported to the workspace. |
Version | MathWorks® release-specific version number of xmlcomp.Edits
object. |
Property of xmlcomp.Node | Description |
---|---|
Children | Array of xmlcomp.Node references to child nodes, if
any. |
Edited | Boolean — If Edited = true then the node is either
inserted or part of a modified matched pair. |
Name | Name of node. |
Parameters | Array of parameter structure arrays. Each structure has two fields, Name and Value. |
Parent | xmlcomp.Node reference to parent node, if any. |
Partner | If matched, Partner is an xmlcomp.Node
reference to the matched partner node in the other tree. Otherwise empty
[] . |