MATLAB Answers

0

How to convert Simulink model into XML file ?

Asked by Dipesh Mudatkar on 4 Jul 2018
Latest activity Edited by TAB
on 4 Jul 2018
I tried following.
>> sys='Example'; % Model name is Example
>> save_system(sys, 'exported_file_name.xml', 'ExportToXML', true)
I am getting following error.
Error using save_system (line 38)
Invalid Simulink object name: Example

  0 Comments

Sign in to comment.

1 Answer

Answer by TAB
on 4 Jul 2018
Edited by TAB
on 4 Jul 2018

You need to first load or open the model.
sys='Example'; % Model name is Example
open_system(sys); % Example model must be in current folder or Matlab path
save_system(sys, 'exported_file_name.xml', 'ExportToXML', true);

  0 Comments

Sign in to comment.