Retrieve decision coverage information from cvdata
object
coverage = decisioninfo(cvdo, object)
coverage = decisioninfo(cvdo, object, mode)
coverage = decisioninfo(cvdo, object, ignore_descendants)
[coverage, description]
= decisioninfo(cvdo, object)
returns
decision coverage results from the coverage
= decisioninfo(cvdo
, object
)cvdata
object cvdo
for
the model component specified by object
.
returns
decision coverage results from the coverage
= decisioninfo(cvdo
, object
, mode
)cvdata
object cvdo
for
the model component specified by object
for the
simulation mode mode
.
returns
decision coverage results for coverage
= decisioninfo(cvdo
, object
, ignore_descendants
)object
, depending
on the value of ignore_descendants
.
[
returns
decision coverage results and text descriptions of decision points
associated with coverage
, description
]
= decisioninfo(cvdo
, object
)object
.
|
| ||||||||||||||||||||||||||||||||||||
|
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
| ||||||||||||||||||||||||||||||||||||
|
Specifies to ignore the coverage of descendant objects if |
|
The value of
| ||||||||||||
|
|
Open the slvnvdemo_cv_small_controller
model
and create the test specification object testObj
.
Enable decision coverage for slvnvdemo_cv_small_controller
and
execute testObj
using cvsim
.
Use decisioninfo
to retrieve the decision coverage
results for the Saturation block and determine the percentage of decision
outcomes covered:
mdl = 'slvnvdemo_cv_small_controller'; open_system(mdl) testObj = cvtest(mdl) testObj.settings.decision = 1; data = cvsim(testObj) blk_handle = get_param([mdl, '/Saturation'], 'Handle'); cov = decisioninfo(data, blk_handle) percent_cov = 100 * cov(1) / cov(2)
Use the coverage settings to collect and display decision coverage results:
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 Decision 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
| getCoverageInfo
| mcdcinfo
| overflowsaturationinfo
| sigrangeinfo
| sigsizeinfo
| tableinfo