How to convert *.slx model to *.mdl using m script?

6 vues (au cours des 30 derniers jours)
Partha Mitra
Partha Mitra le 14 Sep 2018
Commenté : Andreas Goser le 14 Sep 2018
How to convert *.slx model to *.mdl using m script?

Réponse acceptée

Niklas Nylén
Niklas Nylén le 14 Sep 2018
Modifié(e) : Niklas Nylén le 14 Sep 2018
load_system('mysys.slx')
save_system('mysys', 'mysys.mdl')

Plus de réponses (1)

Andreas Goser
Andreas Goser le 14 Sep 2018
Please check the save_system command:
doc save_system
E.g. I find "filename = save_system(sys,newsys) saves the model to a new file newsys. If you do not specify an extension, then save_system uses the file format specified in your Simulink® preferences.". So I would expect if you set that in Simulink's "Model File Preferences", it would work. Try it out.
I wonder however why you want to do this. I have a certain understanding in users have sometimes a need to backport to an older release, but why using the older file format in the same release?
  2 commentaires
Andreas Goser
Andreas Goser le 14 Sep 2018
Niklas, thank you for sharing the reasons. It is important for me to verify MathWorks Developers are aware of this. I see you have contacted Technical Support a few weeks ago for a different type of question and hope your experience was positive. I suggest you contact Technical Support again with your requests. Each enhancement request will be tracked separately and also made sure development gets quantitative and qualitative information about them.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Interactive Model Editing dans Help Center et File Exchange

Produits


Version

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by