Is it possible to generate a Matlab script from a Simulink model?

24 ビュー (過去 30 日間)
Hawkeye
Hawkeye 2024 年 3 月 8 日
コメント済み: Walter Roberson 2025 年 12 月 15 日 19:55
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 件のコメント
Paul
Paul 2025 年 12 月 15 日 14:37
編集済み: Paul 2025 年 12 月 15 日 18:08
Is the .mdl format still supported? I thought that format was just a text file. Maybe .slx can be converted to or saved as mdl?
Walter Roberson
Walter Roberson 2025 年 12 月 15 日 19:55
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

サインインしてコメントする。

採用された回答

Mark McBroom
Mark McBroom 2024 年 3 月 14 日
There is no such utility to do this.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by