Using Simulink | ![]() ![]() |
Using the Debugger's Command-Line Interface
In command line mode, you control the debugger by entering commands at the debugger command line in the MATLAB command window. The debugger accepts abbreviations for debugger commands. See Debugger Command Summary for a list of command abbreviations and repeatable commands. You can repeat some commands by entering an empty command (i.e., by pressing the Return key) at the MATLAB command line.
Block Indexes
Many Simulink debugger commands and messages use block indexes to refer to blocks. A block index has the form s:b
where s
is an integer identifying a system in the model being debugged and b
is an integer identifying a block within that system. For example, the block index 0:1
refers to block 1
in the model's 0
system. The slist
command shows the block index for each block in the model being debugged (see ).
Accessing the MATLAB Workspace
You can enter any MATLAB expression at the sldebug
prompt. For example, suppose you are at a breakpoint and you are logging time and output of your model as tout
and yout
. Then the following command
creates a plot. Suppose you would like to access a variable whose name is the same as the complete or incomplete name of an sldebug
command, for example, s, which is a partial completion for the step
command. Typing an s
at the sldebug
prompt steps the model. However,
displays the value of the variable s
.
![]() | Starting the Simulation | Getting Online Help | ![]() |