How to compare sldd files and publish a HMTL report using Matlab script?
21 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm making a Matlab script to automatically compare sldd files and generate an HTML report.
I can compare .slx, .m, etc. files using the visdiff function and publish a report using the publish function but I can't do the same for sldd files.
compare = visdiff('File1.sldd', 'File2.sldd')
Error using visdiff
Unable to compare 'C:\basic\File1.sldd' and 'C:\basic\File2.sldd' without opening the Comparison Tool.
From Help:
"comparison=visdiff(___) compares two model files and returns a comparison object containing the differences between the two files. This syntax does not open the Comparison Tool and is only supported for comparing Simulink models. name1 and name2 must be model files. Use the comparison object to manipulate the comparison at the command line, for example by applying filters and publishing comparison reports."
Is there any alternative?
I really appreciate any help.
0 commentaires
Réponses (1)
Ashutosh
le 21 Août 2023
The "visdiff" function in MATLAB is designed to visually compare files using the MATLAB Comparison Tool, and it is primarily intended for text-based files like MATLAB code or Simulink models. It is not directly supported for comparing ".sldd" files, which are Simulink Data Dictionaries. The function "visdiff " requires the Comparison Tool to be opened, which does not apply to Simulink Data Dictionary files.
The alternative approach is to Export the Simulink data dictionary data in form of the ".mat" file and then apply the "visdiff" function to compare these ".mat" files.
These links can help to understand the above approach:
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!