How to compare sldd files and publish a HMTL report using Matlab script?
19 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Ashutosh
2023 年 8 月 21 日
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:
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!