Main Content

atrace

Configure simulation debugging session to display information each time algebraic loop is solved

Description

atrace level configures the simulation debugging session to display information each time an algebraic loop is solved in the simulation. Specify the level of information to display using the level input argument.

  • When you start the simulation debugging session programmatically, the information is displayed in the MATLAB® Command Window.

  • When you start the simulation debugging session using the Simulink® Editor, the information is displayed in the Diagnostic Viewer.

You can use this function in a simulation debugging session started:

  • Interactively, using the Simulink Toolstrip

  • Programmatically, using the sldebug function

  • Programmatically, using the sim function with the 'debug' name-value argument

Note

This function is available only for simulation debugging sessions started programmatically and for interactive simulation debugging sessions while paused within a time step.

Input Arguments

collapse all

Level of information to display, specified as one of these options:

  • 0 — No information

  • 1 or 2 — Loop variable solution, number of iterations required to solve loop, estimated solution error

  • 3 — All information for 1 and 2 plus the Jacobian matrix used to solve the loop

  • 4 — All information for 3 plus intermediate solutions for the loop variable

Tips

To start a simulation debugging session interactively, add one or more breakpoints to your model, and in the Breakpoints List, check that Pause within time step is selected. When the simulation pauses on a breakpoint, some of the programmatic debugging commands, such as the stop command, are available for use in the MATLAB Command Window.

Version History

Introduced before R2006a

expand all