How to execute command according to time while running simulation?

3 ビュー (過去 30 日間)
Yandy Ma
Yandy Ma 2017 年 7 月 3 日
回答済み: Shashank 2017 年 7 月 11 日
I am trying to run a simulation using matlab script, and to change the parameter using commands like set_param, however I would like to execute those command one by one according to the simulation time, such as 1 secs one command.
May I ask which is the best way to do it?
  2 件のコメント
Jan
Jan 2017 年 7 月 3 日
You are talking about Simulink, don't you?
Yandy Ma
Yandy Ma 2017 年 7 月 3 日
yes!

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

回答 (1 件)

Shashank
Shashank 2017 年 7 月 11 日
You can run the simulation for one time step using the sim() command. The resulting outputs can be again sent as an input for simulating the model again using sim() command. If you wish to change simulation parameters in between the runs, you can use "set_param" function to set the desired parameters from the command window or MATLAB script.
- Shashank

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by