Change referenced model simulation mode programmatically

9 次查看(过去 30 天)
I have a complex model involving multiple referenced models in "Accelerator" simulation mode.
I want to do model coverage on all models, which requires having the "Normal" simulation mode.
I am looking for a way to recursively change the simulation mode of every referenced model to "Normal" prior to running the simulation. Ideally, something similar to Simulink.BlockDiagram.buildRapidAcceleratorTarget would be best.
Thanks,
Jonathan

回答(1 个)

Aveek Podder
Aveek Podder 2017-10-20
Hi,
You can use 'set_param' command to change the simulation mode of the model.
The following command can be used to set the simulation mode of the model.
set_param('modelname','SimulationMode','mode')
For more information on programmatic interaction with the Acceleration modes, please go through the following link: https://www.mathworks.com/help/simulink/ug/interacting-with-the-acceleration-modes-programmatically.html

类别

Help CenterFile Exchange 中查找有关 Verification, Validation, and Test 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by