Produce HTML report from model coverage objects
cvhtml(file, cvdo)
cvhtml(file, cvdo1, cvdo2, ...)
cvhtml(file, cvdo1, cvdo2, ..., options)
cvhtml(file, cvdo, simMode)
cvhtml(file, cvdo)
creates
an HTML report of the coverage results in the cvdata
or cv.cvdatagroup
object cvdo
when
you run model coverage in simulation. cvhtml
saves
the coverage results in file
. The model must be
open when you use cvhtml
to generate its coverage
report.
cvhtml(file, cvdo1, cvdo2, ...)
creates a combined report of several cvdata
objects.
The results from each object appear in a separate column of the HTML
report. Each cvdata
object must correspond to the
same root model or subsystem. Otherwise, the function fails.
cvhtml(file, cvdo1, cvdo2, ..., options)
creates
a combined report of several cvdata
objects using
the report options specified by options
.
cvhtml(file, cvdo, simMode)
creates an
HTML report for the models having the simulation mode simMode
.
Make sure you have write access to the default MATLAB folder.
Create a cumulative coverage report for the slvnvdemo_cv_small_controller
mode
and save it as ratelim_coverage.html
:
model = 'slvnvdemo_cv_small_controller'; open_system(model); cvt = cvtest(model); cvd = cvsim(cvt); outfile = 'ratelim_coverage.html'; cvhtml(outfile, cvd);
Use the coverage settings to create a model coverage report in an HTML file:
Open the model for which you want a model coverage report.
In the Simulink® Editor, select Model Settings on the Modeling tab.
On the Coverage pane of the Configuration Parameters dialog box, select Enable coverage analysis.
On the Coverage > Results pane, select Generate report automatically after analysis.
Click OK to close the Configuration Parameters dialog box and save your changes.
Simulate the model and review the generated report.