FUNCTION REFERENCE

visdiff

Compare two files or two folders.

Compare two files or two folders.

Syntax

visdiff(file1,file2), visdiff(file1,file2,comparisonType)

The desktop opens the results in the Comparison Tool app. In batch mode, visdiff prints a comparison report. The default compares MAT variables for .mat files and UTF-8 lines for other files. Specify 'text' or 'binary' to select a comparison. Folder comparisons list immediate regular files.

Example

d=tempname(tempdir); mkdir(d); f=fullfile(d,'a.txt'); fid=fopen(f,'w'); fprintf(fid,'abc'); fclose(fid); visdiff(f,f); rmdir(d,'s');

Differences from MATLAB: visdiff takes no output arguments. Folder comparisons are non-recursive and skip symlinks. Text input is bounded to 16 MiB and must be UTF-8. MAT types follow load support, including recursive plain struct fields.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.