0
votes

I have a simulink model with me, and I need to generate an XML file from this model for the purpose of comparison.

I tried the following list of commands -

>> model = 'simple_model_1'; % simple_model_1 is the name of the model
>> open_system(model); % model must be in the current folder or matlab path
>> save_system(model, 'simple_model_1.xml', 'ExportToXML', true);

But I'm getting the following error: Warning: The 'ExportToXML' option is no longer supported and will be removed in a future release.

I am working with MATLAB 2018a. Please let me know if there is any way to generate an XML file from a model with this release of MATLAB.

2

2 Answers

4
votes

The correct way to do model comparison is to use the model comparison tool. The corresponding command-line function is visdiff. The model comparison tool operates directly onto the *.slx files, there's no need to export to XML (this is done internally by the tool).

2
votes

If your model extension is slx, you can use unzip using the unzip command to decompress your model into several files. In the simulink folder, you will find your XML file : blockdiagram.xml.