Add classification information to an
slmetric.config.Threshold object. Then, use the
getClassifications function to identify the
slmetric.config.Classification objects that belong to the threshold object.
Use the removeClassification function to remove an classification
object from the threshold object.
Create an slmetric.config.Configuration object and get the
default slmetric.config.ThresholdConfiguration object.
Create an slmetric.config.Threshold object and add it to the
slmetric.config.ThresholdConfiguration object. This threshold is
for the mathworks.metrics.SimulinkBlockCount metric and the
Value property of the slmetric.metric.Results
object.
Get the default classification object, which defines the compliant category, by
using the function getClassifications on the threshold object
T. Specify metric values for the compliant category by using the
slmetric.metric.MetricRange functions on the range of the
classification object.
Specify values for the Warning metric range.
Specify values for the NonCompliant metric range.
Now, the slmetric.config.Threshold object, T,
contains three slmetric.config.Classification objects. Each one
corresponds to one of the categories compliant, noncompliant, and warning.
P =
1×3 Classification array with properties:
Category
RangeLook at the contents of the Category
property.
P.Category
ans =
'Warning'
ans =
'Compliant'
ans =
'NonCompliant'Use the removeClassification function to remove the warning
category from the slmetric.config.Threshold object.