Skip to Main Content Skip to Search
Product Documentation

Viewing Coverage Results in a Model

Overview of Model Coverage Highlighting

When you simulate a Simulink model, you can configure your model to provide visual results that allow you to see at a glance which objects recorded 100% coverage. After the simulation:

The simulation highlights blocks that received the following types of model coverage:

Enabling Coverage Highlighting

To enable the model coverage colored diagram display:

  1. In the Simulink window, from the Tools menu, select Coverage Settings.

  2. In the Coverage tab, select Coverage for this model.

  3. Select the Results tab.

  4. Select Display coverage results using model coloring. This is the default setting.

After you have enabled the coverage coloring, simulate your model. In the model, you can see at a glance which objects received full, partial, or no coverage.

Examples: Model Coverage Coloring

The following sections show examples of model objects that

Green: Full Coverage

In this example, the Switch block received 100% coverage, as indicated by the green highlighting and the information in the Coverage Display Window.

Red: Partial Coverage

In this example, the control_logic Stateflow chart received the following coverage:

Inside the control_logic subsystem, the Pressure substate was never fail.

In the next example, in the Multiport Switch block, the second and third data ports were never executed.

Gray: Filtered Coverage

In this example, the fuel_rate_control subsystem is highlighted in gray because it was filtered out of coverage recording.

Coverage Display Window

After simulating the model and recording coverage, by default, the Coverage Display Window is the top-most visible window. When you click an object that recorded coverage, the Coverage Display Window displays details of the coverage recorded during simulation.

In the Coverage Display Window, you can:

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS