フィルターのクリア

Is it possible to record, in the form of Matlab code, whatever you do in Simulink?

17 ビュー (過去 30 日間)
I am guessing, many people use macro recording in MS Excel in order to simplify writing VB code. Such macros can be used later many times to perform set of actions in Excel files. What I am looking for is very similar; I need to write Matlab code that can create, modify and execute Simulink models. An easy way to do that would be if I create model in Simulink directly, block by block, while “something” records my every step, every setting of block parameters, etc., resulting in an .m file that can recreate what I have done. Is there such functionality in Matlab?

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 4 月 23 日
Yes, this is possible to create a Simulink model from MATLAB command window as shown here: https://www.mathworks.com/help/simulink/ug/approach-modeling-programmatically.html. However, the recommended way to make Simulink model is from Simulink GUI.
  2 件のコメント
Miroslav Blagojevic
Miroslav Blagojevic 2018 年 4 月 23 日
Thank you Ameer, I apologise if I did not explain my question well. I know that Simulink models can be created from Matlab command window or .m files. But to do that, one has to know a lot about Matlab. As you pointed out, it is much easier if you create the models via Simulink GUI. My question was: while I am building the model via Simulink GUI, can my actions be recorded in an .m file (as Matlab code)? Having an .m file with such code would allow me to recreate the model from scratch as many times as I want, to change its parameters programmatically, to run it and record its outputs many times, all automatically.
Ameer Hamza
Ameer Hamza 2018 年 4 月 24 日
編集済み: Ameer Hamza 2018 年 4 月 24 日
In that case, simulink does not support automatic script generation feature. You can either use GUI or write your own script manually.

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

その他の回答 (1 件)

Miroslav Blagojevic
Miroslav Blagojevic 2018 年 4 月 24 日
Thank you Ameer

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by