Main Content

strace

Display solver information in simulation debugging session

Description

strace lvl configures a simulation debugging session to display information about the solver as you step through a simulation. Specify the level of information to display using the lvl 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.

Displaying solver information in a simulation debugging session can help you determine whether choosing a different solver could improve simulation performance.

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 solver information to display, specified as a scalar between 0 and 4, inclusive. A higher value indicates a higher level of information. To stop displaying solver information in a simulation debugging session, specify the argument as 0.

Tips

  • When you configure a simulation debugging session to display solver information, the software displays several types of timing information related to the solver computations. For information about the notation, use this command.

    help time

  • 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