Configure diagnostic checks, diagnose simulation errors, analyze simulations using model verification blocks

Simulink® provides many diagnostic checks, that can produce errors or warnings when certain conditions are detected during simulation. You can customize what conditions the software checks, and whether those conditions produce errors or warnings.

You can also add Model Verification blocks to your model, to check the condition of specific signals.


Assertion Check whether signal is zero
Check Discrete Gradient Check that absolute value of difference between successive samples of discrete signal is less than upper bound
Check Dynamic Gap Check that gap of possibly varying width occurs in range of signal's amplitudes
Check Dynamic Lower Bound Check that one signal is always less than another signal
Check Dynamic Range Check that signal falls inside range of amplitudes that varies from time step to time step
Check Dynamic Upper Bound Check that one signal is always greater than another signal
Check Input Resolution Check that input signal has specified resolution
Check Static Gap Check that gap exists in signal's range of amplitudes
Check Static Lower Bound Check that signal is greater than (or optionally equal to) static lower bound
Check Static Range Check that signal falls inside fixed range of amplitudes
Check Static Upper Bound Check that signal is less than (or optionally equal to) static upper bound


sldiagnostics Display diagnostic information about Simulink system
Simulink.BlockDiagram.getChecksum Return checksum of model
Simulink.SubSystem.getChecksum Return checksum of nonvirtual subsystem
Simulink.getSuppressedDiagnostics Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model
Simulink.suppressDiagnostic Suppress a diagnostic warning from a specific block
Simulink.restoreDiagnostic Restore diagnostic warnings to a specific block, subsystem, or model
modeladvisor Open Model Advisor
sldebug Start simulation in debug mode
addterms Add terminators to unconnected ports in model


Simulink.SuppressedDiagnostic Suppress diagnostic warnings from a specified block

Examples and How To

Systematic Diagnosis of Errors and Warnings

Identify and locate errors and warnings systematically

Customize Diagnostic Messages

Customize error messages to display text and hyperlink


View Diagnostics

Introduction to Diagnostic Viewer user interface

Report Diagnostic Messages Programmatically

Use sldiagviewer functions to generate, display, and log diagnostic messages

Suppress Diagnostic Messages Programmatically

Suppress and restore diagnostic messages programmatically.

Related Information

Was this topic helpful?