Simulink Reference    

Simulation Commands


The following section describes commands that you can use to run simulations manually.

Task-Oriented List of Commands

This table indicates the tasks performed by the commands described in this chapter. The reference section of this chapter lists the commands in alphabetical order.

Task
Command
Create a new Simulink system.
new_system
Open an existing system.
open_system
Close a system window.
close_system, bdclose
Save a system.
save_system
Find a system, block, line, or annotation.
find_system
Add a new block to a system.
add_block
Delete a block from a system.
delete_block
Replace a block in a system.
replace_block
Add a line to a system.
add_line
Delete a line from a system.
delete_line
Add a parameter to a system.
add_param
Get a parameter value.
get_param
Set parameter values.
set_param
Delete a system parameter.
delete_param
Get the pathname of the current block.
gcb
Get the pathname of the current system.
gcs
Get the handle of the current block.
gcbh
Get the name of the root-level system.
bdroot
Open the Simulink block library.
simulink

Specifying Parameters and Object Paths

This section explains how to specify parameters and object paths required by model construction commands.

How to Specify Parameters for the Commands

The commands described in this chapter require that you specify arguments that describe a system, block, or block parameter. Appendix , "Model and Block Parameters, provides comprehensive tables of model and block parameters.

How to Specify a Path for a Simulink Object

Many of the commands described in this chapter require that you identify a Simulink system or block. Identify systems and blocks by specifying their paths:

If the block name includes a newline or carriage return, specify the block name as a string vector and use sprintf('\n') as the newline character. For example, these lines assign the newline character to cr, then get the value for the Signal Generator block's Amplitude parameter.

If the block name includes a slash character (/), you repeat the slash when you specify the block name. For example, to get the value of the Location parameter for the block named Signal/Noise in the mymodel system.


  slmdldiscui model