Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab 将Simulink模型另存为XML文件_Matlab_Simulink - Fatal编程技术网

Matlab 将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

我有一个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_model_1.xml', 'ExportToXML', true);
但是我得到了以下错误:警告:“ExportToXML”选项不再受支持,将在将来的版本中删除


我正在使用Matlab2018a。请告诉我是否有任何方法可以通过此版本的MATLAB从模型生成XML文件。

如果您的模型扩展名是
slx
,您可以使用
unzip
命令使用unzip将您的模型解压缩为多个文件。在
simulink
文件夹中,您将找到您的XML文件:
blockdiagram.XML

进行模型比较的正确方法是使用。相应的命令行函数为。模型比较工具直接对
*.slx
文件进行操作,无需导出为XML(这是由该工具内部完成的)