フィルターのクリア

How to setting the simulation step in command window

6 ビュー (過去 30 日間)
chengxuan yu
chengxuan yu 2017 年 5 月 7 日
回答済み: Zoe Xiao 2017 年 8 月 2 日
Thanks in advance, any comments will be appreicate。
① I want use Command window let the simulation stepforward for two step, then stepbackward for 3 step, how to achieve it.
② As you know, we can set the simulation command as below:
set_param('VOL_Main','SimulationCommand','start');
set_param('VOL_Main','SimulationCommand','pause');
set_param('VOL_Main','SimulationCommand','continue');
set_param('VOL_Main','SimulationCommand','update');
set_param('VOL_Main','SimulationCommand','stop');
Except for these five command, does anybody can tell me all the command we can use after SimulationCommand.
③ How can I enable stepping back through Command window
④ How can I use the parameter 'tt' as the pause time in the Simulation stepping back window before i define it in the command window. Thanks again!

回答 (1 件)

Zoe Xiao
Zoe Xiao 2017 年 8 月 2 日
2. You can use 'set_param' to programmatically control a model simulation. More information can be found in the documentation here: https://www.mathworks.com/help/simulink/ug/control-simulations-programmatically.html
3. For stepping back, I believe there is no commands to achieve so in time. And the stepper cannot handle undefined function or variable as the pause time.

カテゴリ

Help Center および File Exchange建模 についてさらに検索

Community Treasure Hunt

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

Start Hunting!