sigrangeinfo

Retrieve signal range coverage information from cvdata object

Syntax

[min, max] = sigrangeinfo(cvdo, object)
[min, max] = sigrangeinfo(cvdo, object, portID)

Description

[min, max] = sigrangeinfo(cvdo, object) returns the minimum and maximum signal values output by the model component object within the cvdata object cvdo.

[min, max] = sigrangeinfo(cvdo, object, portID) returns the minimum and maximum signal values associated with the output port portID of the Simulink® block object.

Input Arguments

cvdo

cvdata object

object

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

Object SpecificationDescription

BlockPath

Full path to a model or block

BlockHandle

Handle to a 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}

Cell 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 value 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 value 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 range data for the Product block in the slvnvdemo_cv_small_controller model:

mdl = 'slvnvdemo_cv_small_controller';
open_system(mdl)
%Create test spec object
testObj = cvtest(mdl)
%Enable signal range coverage
testObj.settings.sigrange = 1;
%Simulate the model
data = cvsim(testObj)
blk_handle = get_param([mdl, '/Product'], 'Handle');
%Get signal range data
[minVal, maxVal] = sigrangeinfo(data, blk_handle)

Alternatives

Use the coverage settings to collect signal range coverage for a model:

  1. Open the model for which you want to collect signal range coverage.

  2. In the Model Editor, select Model Settings on the Modeling tab.

  3. On the Coverage pane of the Configuration Parameters dialog box, select Enable coverage analysis.

  4. Under Coverage metrics, select Signal Range.

  5. On the Coverage > Results pane, specify the output you need.

  6. Click OK to close the Configuration Parameters dialog box and save your changes.

  7. Simulate the model and review the results.

Introduced in R2006b