Installation guide
6 Editing and Debugging M-Files
Comparing Files — File Comparison Tool
In this section...
“What Is the File Comparison Tool?” on page 6-54
“Running the File Comparison Tool” on p age 6-54
“Increase or Decrease Line Lengths Shown” on page 6-56
“Exchange Positions” on page 6-57
“Show Updated Files” on page 6-57
“Find Text in Files” on page 6-57
“Compare to Other Files” on page 6-57
“Perform New and View Previous Comparisons” on page 6-57
“Alternative Ways to Access the Tool” on page 6-58
What Is the File Comparison Tool?
TheFileComparisonstoolidentifiesdifferences line by line between two files.
Some other applications refer to this as a file diff. As an example, you can use
this to easily compare an autosaved ve rsion of a file to the latest version.
Running the File Comparison Tool
To use the tool, follow these steps:
1 Open one of the files you want to compare in the Editor/Debugger.
To open the example file pro vided,
lengthofline.m,run
open(fullf
ile(matlabroot,'help','techdoc','matlab_env',...
'examples'
,'lengthofline.m'))
2 Select Tools > Compare Against > Browse. Navigatetothefileyou
want to compare against, select the file, and click Open.Toopenthe
examplefileprovided,select
lengthofline2.m. Other options available are
6-54