|
|
|
| R2012a Documentation → Simulink Verification and Validation | |
Learn more about Simulink Verification and Validation |
|
| Contents | Index |
coverage = mcdcinfo(cvdo, object)
coverage = mcdcinfo(cvdo, object, ignore_descendants)
[coverage, description] = mcdcinfo(cvdo, object)
coverage = mcdcinfo(cvdo, object) returns modified condition/decision coverage (MCDC) results from the cvdata object cvdo for the model component specified by object.
coverage = mcdcinfo(cvdo, object, ignore_descendants) returns MCDC results for object, depending on the value of ignore_descendants.
[coverage, description] = mcdcinfo(cvdo, object) returns MCDC results and text descriptions of each condition/decision in object.
coverage |
Two-element vector of the form [covered_outcomes total_outcomes]. coverage is empty if cvdo does not contain modified condition/decision coverage results for object. The two elements are:
| ||||||||||
description |
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) testObj = cvtest(mdl) %Create test specification object testObj.settings.mcdc = 1; %Enable MCDC coverage data = cvsim(testObj) %Simulate model blk_handle = get_param([mdl, '/Gain/Logic'], 'Handle'); cov = mcdcinfo(data, blk_handle) %Retrieve MCDC results for Logic block percent_cov = 100 * cov(1) / cov(2) %Percentage of MCDC outcomes covered
To collect MCDC coverage for a model:
Open the model.
In the Model Editor, select Tools > Coverage Settings.
On the Coverage tab, under Coverage Metrics, select MCDC Coverage.
On the Results and Report tabs, select the desired options.
Click OK to close the Coverage Settings dialog box.
Simulate the model and review the MCDC coverage in the report.
complexityinfo | conditioninfo | cvsim | decisioninfo | getCoverageInfo | 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 |