| Development Environment | ![]() |
Comparing the Working Copy of a File to the Latest Version in Source Control
You can use the Differences option to compare the current working copy of a file on disk with the latest checked-in version of the file in the source control system. Note that you can only show differences on one file at a time, not multiple files.
Comparing M-Files
To show differences of an M-file:
Comparing Simulink and Stateflow Model Files
| Note The Simulink Graphical Model Merge tool is used to show the differences between versions of Simulink models. You need to have Simulink Performance Tools installed on your computer to do this. |
To show differences of a Simulink or Stateflow model with Simulink Performance Tools installed on your system:
Function Alternative for Showing File Differences
| Note For MATLAB command window access to the source control interface, you must first create a window and get its handle. See Using the Source Control Interface from the MATLAB Command Window for instructions on doing this. |
Use isdiff as the first argument in the verctrl function to return a Boolean value to the window, which indicates whether or not there are any differences between the current file on disk and the latest checked-in version of the file. The verctrl function with the isdiff argument has this form:
This will return the following in the command window if the two copies of the file are different:
Use showdiff as the first argument in the verctrl function to show the differences between the disk copy of a file and the latest checked-in version in the source control system. Note that the verctrl function with the showdiff argument does not return anything. The verctrl function with the showdiff argument has this form:
| Showing File History | Displaying Source Control Properties of a File | ![]() |