How to get the visdiff output ?
Afficher commentaires plus anciens
Hello,
After using a visdiff(file1,file2,'txt') expression, it opens a window with the differencies between the two files, which is exactly what I'm looking for.
But how do you use it as an output ?
At the end, there is :
Number of matching lines: XXX
Number of unmatched lines in left file: XXX
Number of unmatched lines in right file: XXX
How do I get each of them (not the number but the output)
Cheers
Réponses (1)
Raghvendra Kumar
le 7 Juil 2020
Modifié(e) : Raghvendra Kumar
le 7 Juil 2020
0 votes
Hi Maha, this might help you
comparison = visdiff('test.m', 'test2.m');
fp = fopen('diff.txt', 'w');
fprintf(fp, '%s', comparison);
fclose(fp);
the diff.txt file will contain the output
Catégories
En savoir plus sur General PDEs dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!