Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Solutions Academia Support User Community Company
spacer spacer spacer spacer spacer spacer

Technical Solutions

How do I stop a simulation in Simulink from the MATLAB command window?


Date Last Modified: Friday, June 26, 2009
Solution ID:   1-15KAD
Product:   Simulink
Reported in Release:   R12.1
Platform:   All Platforms
Operating System:   All OS
 

Subject:

How do I stop a simulation in Simulink from the MATLAB command window?

Problem Description:

How do I stop a simulation in Simulink from the MATLAB command window?

Solution:

You can use the following command at the MATLAB command prompt to stop a simulation in SIMULINK from the MATLAB command window:
set_param(gcs, 'SimulationCommand', 'stop')
For more information on what other simulatin commands you can use with SET_PARAM see the Using Simulink Guide here:

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/set_param.html

You may also find the following tech note useful:

http://www.mathworks.com/support/tech-notes/1900/1903.html

Please provide feedback to help us improve this Solution
Contact support
E-mail this page
Print this page