Retrieve modified condition/decision coverage information
from cvdata
object
coverage = mcdcinfo(cvdo, object)
coverage = mcdcinfo(cvdo, object, mode)
coverage = mcdcinfo(cvdo, object, ignore_descendants)
[coverage, description]
= mcdcinfo(cvdo, object)
returns
modified condition/decision coverage (MCDC) results from the coverage
= mcdcinfo(cvdo
, object
)cvdata
object cvdo
for
the model component specified by object
.
returns
modified condition/decision coverage (MCDC) results from the coverage
= mcdcinfo(cvdo
, object
, mode
)cvdata
object cvdo
for
the model component specified by object
for the
simulation mode mode
.
returns
MCDC results for coverage
= mcdcinfo(cvdo
, object
, ignore_descendants
)object
, depending on the value
of ignore_descendants
.
[
returns
MCDC results and text descriptions of each condition/decision in coverage
, description
]
= mcdcinfo(cvdo
, object
)object
.
|
| ||||||||||||||||||||||||||||||||||||
|
Logical value specifying whether to ignore the coverage of descendant objects
| ||||||||||||||||||||||||||||||||||||
|
The
When specifying an S-function block, valid values for
For coverage data collected during Software-in-the-Loop (SIL)
mode or Processor-in-the-Loop (PIL) simulation mode, valid values
for
| ||||||||||||||||||||||||||||||||||||
|
The
|
|
Two-element vector of the form
| ||||||||||||
|
A structure array containing the following fields:
|
Collect MCDC coverage for the slvnvdemo_cv_small_controller
model
and determine the percentage of MCDC coverage collected for the Logic
block in the Gain subsystem:
mdl = 'slvnvdemo_cv_small_controller'; open_system(mdl) %Create test specification object testObj = cvtest(mdl) %Enable MCDC coverage testObj.settings.mcdc = 1; %Simulate model data = cvsim(testObj) %Retrieve MCDC results for Logic block blk_handle = get_param([mdl, '/Gain/Logic'], 'Handle'); cov = mcdcinfo(data, blk_handle) %Percentage of MCDC outcomes covered percent_cov = 100 * cov(1) / cov(2)
Use the coverage settings to collect MCDC coverage for a model:
Open the model.
In the Model Editor, select Model Settings on the Modeling tab.
On the Coverage pane of the Configuration Parameters dialog box, select Enable coverage analysis.
Under Coverage metrics, select MCDC as the structural coverage level.
Click OK to close the Configuration Parameters dialog box and save your changes.
Simulate the model by clicking the Run button and review the results.
complexityinfo
| conditioninfo
| cvsim
| decisioninfo
| getCoverageInfo
| overflowsaturationinfo
| sigrangeinfo
| sigsizeinfo
| tableinfo