| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Verification and Validation |
| Contents | Index |
| Learn more about Simulink Verification and Validation |
coverage = decisioninfo(cvdo, object)
coverage = decisioninfo(cvdo, object, ignore_descendants)
[coverage, description] = decisioninfo(cvdo, object)
coverage = decisioninfo(cvdo, object) returns decision coverage results from the cvdata object cvdo for the model component specified by object.
coverage = decisioninfo(cvdo, object, ignore_descendants) returns decision coverage results for object, depending on the value of ignore_descendants.
[coverage, description] = decisioninfo(cvdo, object) returns decision coverage results and text descriptions of decision points associated with object.
cvdo |
cvdata object |
ignore_descendants |
Specifies to ignore the coverage of descendant objects if ignore_descendants is set to 1. |
object |
The object argument specifies an object in the model or Stateflow chart that received decision coverage. Valid values for object include the following:
|
coverage |
The value of coverage is a two-element vector of the form [covered_outcomes total_outcomes].coverage is empty if cvdo does not contain decision coverage results for object. The two elements are:
|
description |
description is a structure array containing the following fields:
|
Open the slvnvdemo_cv_small_controller model and create the test specification object testObj. Enable decision coverage for testObjand 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)
To collect and display decision coverage results:
Open the model.
In the Model Editor, select Tools > Coverage Settings.
On the Coverage tab, under Coverage Metrics, select Decision Coverage.
Click OK to close the Coverage Settings dialog box.
Simulate the model and review the results.
conditioninfo | cvsim | mcdcinfo | sigrangeinfo | tableinfo
![]() | cvtest | get (cv.cvdatagroup) | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |