mfilecompare (Scripts) Publisher's description
from Mathias Benedek
This function was designed to analyze and display the overlap of the content of a given set of m-files
This function was designed to analyze and display the overlap of the content of a given set of m-files.
A figure will open containing 2 plots (see screenshot). In the left plot the relative overlap of any two files is represented by fields in shades of gray ranging from black (0% overlap) to white (100% overlap). The right plot for each file displays the number of characters of the code part (black) and the comment part(green).
For the analysis of the overlap of (A,B), A is divided into chunks of a given number of characters and each chunk is checked for a match in B. The overlap of (A,B) thus reflects how much of A is found in B, which is not identical to the overlap of (B,A).
The analysis can focus on the entire content, the code or the comments only (settable in a pop-up menu in the lower left corner).
How to use it:
Simply run this function. As an optional input argument you can define the chunk size (default = 10 characters). You will be requested to select a directory containing the files you wish to compare. After that, the analysis figure will be displayed.
For any combination of two files you can access more detailed information (displayed in the text field at the bottom of the figure) by moving the mouse over the respective fields in the plot. By clicking on any field in the left plot the relevant m-files will be opened in the Matlab editor.
I use this function in my Matlab course to check assignments for the amount of collaboration and plagiarism.
System Requirements:MATLAB 7.6 (R2008a)
Program Release Status: New Release
Program Install Support: Install and Uninstall