Skip to Main Content Skip to Search
Product Documentation

tableinfo - Display lookup table coverage information for model object

Syntax

coverage = tableinfo(cvdo, object)
coverage = tableinfo(cvdo, object, ignore_descendants)
[coverage, exeCounts] = tableinfo(cvdo, object)
[coverage, exeCounts, brkEquality] = tableinfo(cvdo, object)

Description

coverage = tableinfo(cvdo, object) returns lookup table coverage results from the cvdata object cvdo for the model component object.

coverage = tableinfo(cvdo, object, ignore_descendants) returns lookup table coverage results for object, depending on the value of ignore_descendants.

[coverage, exeCounts] = tableinfo(cvdo, object) returns lookup table coverage results and the execution count for each interpolation/extrapolation interval in the lookup table block object.

[coverage, exeCounts, brkEquality] = tableinfo(cvdo, object) returns lookup table coverage results, the execution count for each interpolation/extrapolation interval, and the execution counts for breakpoint equality.

Input Arguments

cvdo

cvdata object

ignore_descendants

Logical value specifying whether to ignore the coverage of descendant objects

1 — Ignore coverage of descendant objects
0 — Collect coverage for descendant objects

object

Full path or handle to a lookup table block or a model containing a lookup table block.

Output Arguments

brkEquality

A cell array containing vectors that identify the number of times during simulation that the lookup table block input was equivalent to a breakpoint value. Each vector represents the breakpoints along a different lookup table dimension.

coverage

The value of coverage is a two-element vector of form [covered_intervals total_intervals], the elements of which are:

covered_intervalsNumber of interpolation/extrapolation intervals satisfied for object
total_intervalsTotal number of interpolation/extrapolation intervals for object

coverage is empty if cvdo does not contain lookup table coverage results for object.

execounts

An array having the same dimensionality as the lookup table block; its size has been extended to allow for the lookup table extrapolation intervals.

Examples

Collect lookup table coverage for the slvnvdemo_cv_small_controller model and determine the percentage of interpolation/extrapolation intervals coverage collected for the Gain Table block in the Gain subsystem:

mdl = 'slvnvdemo_cv_small_controller';
open_system(mdl)
testObj = cvtest(mdl)                          %Create test spec object
testObj.settings.tableExec = 1;                %Enable lookup table coverage
data = cvsim(testObj)                          %Simulate the model
blk_handle = get_param([mdl, '/Gain/Gain Table'], 'Handle');
cov = tableinfo(data, blk_handle)              %Retrieve l/u table coverage 
percent_cov = 100 * cov(1) / cov(2)            %Percent MC/DC outcomes covered

Alternatives

To collect lookup coverage for a model:

  1. Open the model.

  2. In the Model Editor, select Tools > Coverage Settings.

  3. On the Coverage tab, under Coverage Metrics, select Look-up Table Coverage.

  4. On the Results and Report tabs, select the desired options.

  5. Click OK to close the Coverage Settings dialog box.

  6. Simulate the model and review the lookup table coverage in the report.

See Also

complexityinfo | conditioninfo | cvsim | decisioninfo | getCoverageInfo | mcdcinfo | sigrangeinfo | sigsizeinfo

How To

  


Related Products & Applications

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