Skip to Main Content Skip to Search
Product Documentation

sigsizeinfo - Collect signal size coverage information for model object

Syntax

[min, max, allocated] = sigsizeinfo(cvdo, object)
[min, max] = sigsizeinfo(cvdo, object, portID)

Description

[min, max, allocated] = sigsizeinfo(cvdo, object) returns the minimum, maximum, and allocated signal sizes for the outputs of the model component object within the cvdata object cvdo.

[min, max] = sigsizeinfo(cvdo, object, portID) returns the minimum and maximum signal sizes associated with the output port portID of the model component object.

Input Arguments

cvdo

cvdata object

object

An object in the model or Stateflow chart that receives signal size coverage. Valid values for object include the following:

Object SpecificationDescription

BlockPath

Full path to a Simulink model or block

BlockHandle

Handle to a Simulink model or block

slObj

Handle to a Simulink API object

sfID

Stateflow ID

sfObj

Handle to a Stateflow API object

{BlockPath, sfID}

Cell array with the path to a Stateflow chart or atomic subchart and the ID of an object contained in that chart or subchart

{BlockPath, sfObj}

Cell array with the path to a Stateflow chart or atomic subchart and a Stateflow object API handle contained in that chart or subchart

[BlockHandle, sfID]

Array with a handle to a Stateflow chart or atomic subchart and the ID of an object contained in that chart or subchart

portID

Output port of the block object

Output Arguments

max

Maximum signal size output by the model component object within the cvdata object, cvdo. If object outputs a vector, min and max are also vectors.

min

Minimum signal size output by the model component object within the cvdata object, cvdo. If object outputs a vector, min and max are also vectors.

allocated

Allocated signal size output by the model component object within the cvdata object, cvdo. If object outputs a vector, min and max are also vectors.

Examples

Collect signal size coverage data for the Switch block in the sldemo_varsize_basic model:

mdl = 'sldemo_varsize_basic';
open_system(mdl);
testObj = cvtest(mdl);                                       %Create test spec object
testObj.settings.sigsize=1;                                  %Enable signal size coverage
data = cvsim(testObj);                                       %Simulate the model
blk_handle = get_param([mdl, '/Switch'], 'Handle');          %Set the block handle
[minVal, maxVal, allocVal] = sigsizeinfo(data, blk_handle);  %Get signal size data   

Alternatives

To collect signal size coverage for a model, using the GUI:

  1. Open the model for which you want signal size coverage.

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

  3. On the Coverage tab, under Coverage Metrics, select Signal Size Coverage.

  4. Open the Results and Report tabs and specify the type of output that you need.

  5. Click OK.

  6. Simulate the model and view the results.

See Also

complexityinfo | conditioninfo | cvsim | decisioninfo | mcdcinfo | sigrangeinfo | tableinfo

  


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