This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

View Diagnostics

You can view and diagnose errors and warnings generated by your model using the Diagnostic Viewer. The Diagnostic Viewer displays three types of diagnostic messages: errors, warnings, and information. A model generates these messages during a runtime operation, like model load, simulation, or update diagram.

The diagnostic viewer window is divided into:

  • Toolbar menu: Displays various commands to help you manage the diagnostic messages. For more information, see Toolbar.

  • Diagnostic Message pane: Displays the error, warning, and information messages. For more information, see Diagnostic Message Pane.

  • Suggested Actions: Displays suggestions and fixes to correct the diagnostic errors and warnings. For more information, see.Suggested Actions.


To manage the diagnostic messages, use the Diagnostic Viewer toolbar.


Expand or collapse messages

Save all or latest messages in a log file

Copy all or latest messages

Clear all or all but latest messages

Filter out errors, warning, and information messages

Group similar type of messages

Search messages for specific keywords and navigate between messages

Set maximum number of models to display in tabbed panes and the maximum number of events to display per model

Diagnostic Message Pane

The diagnostic message pane displays the error, warning, and information messages in a tabbed format. These messages are color-coded for distinction and are hierarchical.

A new stage is generated for each successive event, you can save or clear stage. Each stage represents a single event such as model load, update diagram, or simulation.

Different types of diagnostic messages are:

  • Information message: Displays the information related to a model load. Information messages are marked as .

  • High priority warning: Displays the errors encountered during model load as a high priority warning. Any subsequent operation, like update on the model without rectifying the high priority warning messages are marked as errors. High priority warnings are marked as .

  • Warning: Displays the warnings associated during an operation on a model. Warnings are marked as .

  • Error: Displays the errors associated during an operation on a model. Errors are marked as .


    To locate the source of error, click the hyperlink in the message. The source of error in the model is highlighted.

Suppress Diagnostics

The Diagnostic Viewer provides a Suppress button for certain diagnostics. This button allows you to suppress certain numerical diagnostics (for example, overflow, saturation, precision loss) for specific objects in your model. You can also suppress certain errors that have diagnostic level set to error in the Diagnostics section of Model Configuration Parameters. You can add a comment for the suppressed diagnostics.

To suppress the diagnostic from the specified source, click the Suppress button next to the diagnostic in the Diagnostic Viewer. You can restore the diagnostic from the source by clicking Restore. Diagnostic suppressions are saved with the model and persist across sessions.

The suppressed diagnostics are displayed in the Suppressions tab. You can restore the suppressed diagnostics, add or edit comments to the suppressed diagnostic by using the Restore and Add Comment buttons respectively. Alternatively, you can perform these actions on the suppressed diagnostic by selecting one of the options from the Actions menu.

The Suppression tab of the Diagnostic Viewer displays the model name in the left pane of the suppressed diagnostics in the right pane in a tabular format. You can use the filter options available in the Diagnostic,Suppression Location, and the Comment columns to filter the diagnostics.

You can also control the suppression of diagnostics from the command line. For more information, see Suppress Diagnostic Messages Programmatically.

Suggested Actions

Diagnostic viewer provides suggestions and fixes for diagnostic error and warning messages. These suggestions and fixes are provided in the Suggested Actions section of diagnostic message pane.

A diagnostic error or warning can have multiple fixes and suggestions. Each fix is associated with a Fix button.

You can click the Fix button for the most suitable fix to rectify the error automatically. In some cases, you can provide the fix by one of these ways:

  • Enter the values in the available edit boxes.

  • Select a value from one of the listed values from a combo box.

The Fix buttons for a diagnostic error or warning are no longer available after a fix is successfully applied. If a fix was unsuccessful, a failure message is displayed in the Suggested Actions section.

Suggestions are provided for errors and warnings that cannot be fixed automatically.


The Suggested Actions section is available only for the diagnostic errors or warnings that have a predefined fix.

Related Topics

Was this topic helpful?