Is it possible to generate a Matlab script from a Simulink model?
Mostra commenti meno recenti
Matlab provides a method for programmatically modifying or generating Simulink models ( https://www.mathworks.com/help/simulink/ug/approach-modeling-programmatically.html ).
I have a large collection of Simulink models that I would like to convert into scripts which, when executed, would then re-generate the orginal (or functionally equivalent) model. In effect, I want a way to seemlessly convert between .slx files and a text-based representation. Does Matlab provide a utility that does this?
4 Commenti
Paul
il 9 Mar 2024
Hi Hawkeye,
Interesting question.
If you don't mind me asking, what is the use case for such a utility?
Richard Crozier
il 15 Dic 2025
@Paul one use case would be a diffable text representation of the model that would be compatible with Git version control without special programs. I'm interested in the idea myself.
Walter Roberson
il 15 Dic 2025
Indeed, .mdl file format is still supported (as of R2025b.) And that might satisfy the need as expressed by @Richard Crozier . It is not really clear to me, though, whether or not that would satisfy the original request by @Hawkeye
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Programmatic Model Editing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!