|
|
|
| R2012a Documentation → Simulink Verification and Validation | |
Learn more about Simulink Verification and Validation |
|
| Contents | Index |
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.
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 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)
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.
Click OK to close the Coverage Settings dialog box and save your changes.
Simulate the model and review the results.
complexityinfo | conditioninfo | cvsim | getCoverageInfo | mcdcinfo | sigrangeinfo | sigsizeinfo | tableinfo

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