Using Simulink Previous page   Next Page

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 the Simulink Reference for a list of command abbreviations and repeatable commands. You can repeat some commands by entering an empty command (i.e., by pressing the Enter key) at the MATLAB command line.

Method ID

Some Simulink commands and messages use method IDs to refer to methods. A method ID is an integer assigned to a method the first time it is invoked in a simulation. The debugger assigns method indexes sequentially, starting with 0 for the first method invoked in a debugger session.

Block ID

Some Simulink debugger commands and messages use block IDs to refer to blocks. Simulink assigns block IDs to blocks while generating the model's sorted lists during the compilation phase of the simulation. A block ID has the form sid:bid where sid is an integer identifying the system that contains the block (either the root system or a nonvirtual subsystem) and bid is the position of the block in the system's sorted list. For example, the block index 0:1 refers to the first block in the model's root system. The slist command shows the block ID 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. You cannot display the value of a workspace variable whose name is partially or entirely the same as that of a debugger command by entering it at the debugger command prompt. You can, however, use the MATLAB eval command to work around this problem. For example, use eval('s') to determine the value of s rather then s(tep) the simulation.


Previous page  Using the Debugger's Graphical User Interface Getting Online Help Next page

© 1994-2005 The MathWorks, Inc.