Retrieve signal range coverage information from
= 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
Output port of the block
Maximum signal value output by the model component
Minimum signal value output by the model component
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
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)