MATLAB Answers

Generate/Save html report of 2 mat file comparison using the matlab "compare" feature programmatically (using visdiff)

7 views (last 30 days)
you mess
you mess on 3 Jul 2019
Commented: Sudhakar Shinde on 16 Sep 2020
I have two mat files, assume mat1.mat has 10 signals and mat2.mat has 15 signals, and both the mat files share some same/common variables/signals, which are input to Matlab Compare feature. The comparison between the selected 2 mat files is established in a new window and we can manually save the comparison report using "Save As>HTML".
But I want to do the same process programmatically. I'm using the "visdiff" command of matlab to pop the comparison window, but I can't seem to find the commands for generating/saving the comparison report.
Please, provide me with your valueable information or let me know whether it can be acheived programmatically.
Thanks in advance. I'm using Matlab 2016b

  1 Comment

Sudhakar Shinde
Sudhakar Shinde on 16 Sep 2020
1. 'visdiff()' function generates the 'Comparison object' for the Simulink models only. Please refer to the documentation for more information.
Eg. comparison = visdiff(modelname1, modelname2);
2. It looks like till R2019b release, mat difference can not be feasible to save in html using programmatic approach. Hopefully latest version will help.

Sign in to comment.

Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!