Debugging Information in Workspace Variables

State inspection functions in the SimEvents® debugger enable you to view information in the Command Window, as the sections Inspect Entities, Blocks, and Events and View the Event Calendar describe. An alternative way to capture the same information is in a variable in the MATLAB® base workspace. Capturing information in a workspace variable lets you accomplish these goals:

  • Use information from one command as an input to another command, without having to type or paste information from the Command Window.

  • Cache information at a certain point in the simulation, for comparison with updated information at a later point in the simulation. The workspace variable remains fixed as the simulation proceeds.

  • Store information in a MAT-file and use it in a different MATLAB software session.

Was this topic helpful?