| Simulink® | ![]() |
strace level
level | Trace level (0 = none, 1 = everything). |
The strace command causes the solver to display diagnostic information in the MATLAB Command Window, depending on the value of level. Valid values are 0 (no information) or 1 (maximum detail).
Command | Displays |
|---|---|
No information | |
Information about time steps, integration steps, zero crossings, and solver resets |
When diagnostic tracing is on, the debugger displays the sizes of major and minor time steps:
[TM = 13.21072088374186 ] Start of Major Time Step [Tm = 13.21072088374186 ] Start of Minor Time Step
The debugger also displays integration information, including the time step of the integration method, the step size of the integration method, the outcome of the integration step, the normalized error, and the index of the state:
[Tm = 13.21072088374186 ] [H = 0.2751116230148764 ] Begin Integration Step [Tf = 13.48583250675674 ] [Hf = 0.2751116230148764 ] Fail [Er = 1.0404e+000] [Ix = 1] [Tm = 13.21072088374186 ] [H = 0.2183536061326544 ] Retry [Ts = 13.42907448987452 ] [Hs = 0.2183536061326539 ] Pass [Er = 2.8856e-001] [Ix = 1]
When a zero crossing is detected, the debugger displays information about the iterative search algorithm used to identify when the zero crossing occurred. This includes the time step of the zero crossing, the step size of the zero crossing detection algorithm, the length of the time interval bracketing the zero crossing, and a flag denoting the rising or falling direction of the zero crossing:
[Tz = 3.615333333333301 ] Detected 1 Zero Crossing Event 0[F]
Begin iterative search to bracket zero crossing event
[Tz = 3.621111157580072 ] [Hz = 0.005777824246771424 ] [Iz = 4.2222e-003] 0[F]
[Tz = 3.621116982080098 ] [Hz = 0.005783648746797265 ] [Iz = 4.2164e-003] 0[F]
[Tz = 3.621116987943544 ] [Hz = 0.005783654610242994 ] [Iz = 4.2163e-003] 0[F]
[Tz = 3.621116987943544 ] [Hz = 0.005783654610242994 ] [Iz = 1.1804e-011] 0[F]
[Tz = 3.621116987949452 ] [Hz = 0.005783654616151157 ] [Iz = 5.8962e-012] 0[F]
[Tz = 3.621116987949452 ] [Hz = 0.005783654616151157 ] [Iz = 5.1514e-014] 0[F]
End iterative search to bracket zero crossing eventWhen solver resets occur, the debugger displays the time at which the solver was reset:
[Tr = 6.246905153573676 ] Process Solver Reset [Tr = 6.246905153573676 ] Reset Zero Crossing Cache [Tr = 6.246905153573676 ] Reset Derivative Cache
For more information about the notation displayed by strace, type the following command at the sldebug prompt:
help time
atrace, etrace, states, trace, zclist
![]() | stop | systems | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |