Matlab 将Simulink模型另存为XML文件
我有一个simulink模型,我需要从这个模型生成一个XML文件,以便进行比较 我尝试了以下命令列表-Matlab 将Simulink模型另存为XML文件,matlab,simulink,Matlab,Simulink,我有一个simulink模型,我需要从这个模型生成一个XML文件,以便进行比较 我尝试了以下命令列表- >> 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_mod
>> 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);
但是我得到了以下错误:警告:“ExportToXML”选项不再受支持,将在将来的版本中删除
我正在使用Matlab2018a。请告诉我是否有任何方法可以通过此版本的MATLAB从模型生成XML文件。如果您的模型扩展名是
slx
,您可以使用unzip
命令使用unzip将您的模型解压缩为多个文件。在simulink
文件夹中,您将找到您的XML文件:blockdiagram.XML
进行模型比较的正确方法是使用。相应的命令行函数为。模型比较工具直接对*.slx
文件进行操作,无需导出为XML(这是由该工具内部完成的)