You can also run the coverage tool interactively:
In the Simulink® Editor, select Model Settings on the Modeling tab.
In the Configuration Parameters dialog box, on the Coverage Pane, select Enable coverage analysis, which enables the coverage settings.
Under Coverage metrics, select the types of coverage that you want to record in the coverage report. Click OK.
Simulate the model.
Coverage™ saves coverage data for the current run in the workspace object
covdata and cumulative coverage data in
covCumulativeData, by default if you simulate using the
Run button. Simulink
Coverage also saves these results to a
.cvt file by
default. At the end of the simulation, the data appears in an HTML report that
opens next to your model. For more information on coverage data settings, see
Specify Coverage Options.
You cannot run simulations if you select both the model coverage reporting and acceleration options. If you set the simulation mode to Accelerator, Simulink Coverage does not record coverage.
When you perform coverage analysis, you cannot select both block reduction and conditional branch input optimization, because they interfere with coverage recording. See Simulink Optimizations and Model Coverage for more information.