Retrieve signal range coverage information from cvdata object
= sigrangeinfo(cvdo, object)
[min, max] = sigrangeinfo(cvdo, object, portID)
An object in the model or Stateflow® chart that receives signal range coverage. Valid values for object include the following:
Output port of the block object
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.
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.
Use the Coverage Settings dialog box to collect signal range coverage for a model:
Open the model for which you want to collect signal range coverage.
In the Model Editor, select Analysis > Coverage > Settings.
On the Coverage tab, select Coverage for this model.
Under Coverage metrics, select Signal Range.
On the Results and Reporting tabs, specify the output you need.
Click OK to close the Coverage Settings dialog box and save your changes.
Simulate the model and review the results.
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)