Comparing .mdl and .slx
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Tim Busfield
il 28 Apr 2015
Commentato: Tim Busfield
il 29 Apr 2015
I have two Simulink models, one .mdl and one .slx. I want to confirm that the structure & functionality of the two models is the same, however the .mdl will not compile in R2014b - so I cannot use the 'Analysis > Compare Simulink XML Files' approach. Is there a way to convert the models to xml in 2010b and 2014b respectively and compare outside of Matlab (ie using diff tool) and how (dis)similar are the xml structures of .mdl and .slx models?
0 Commenti
Risposta accettata
Christiaan
il 29 Apr 2015
Dear Mr. Busfield,
As you may already know SLX is a compressed package that conforms to the Open Packaging Conventions (OPC) interoperability standard. SLX stores model information using Unicode® UTF-8 in XML and other international formats. Therefore in Simulink it is easy to export an slx file to an xml file.
What you may can try is to write the following in the MATLAB prompt:
>> save_system('model.mdl', 'model_xml.xml','ExportToXML', true);
A second possibility is that you save the mdl file in Simulink (2014 Version) to a slx file. In principle, if you upgrade an MDL file to SLX file format, the file contains the same information as the MDL file, and you always have a backup file. Now you could compare the xml files.
Kind regards, Christiaan
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Programmatic Model Editing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!