Main Content


Class: slmetric.config.ThresholdConfiguration
Package: slmetric.config

Create an slmetric.config.Threshold object


Create an slmetric.config.Threshold object to apply thresholds to the data for a specific metric.


TH = addThreshold(TC,metricid,thresholdproperty) creates an slmetric.config.Threshold object.

Input Arguments

expand all

slmetric.config.ThresholdConfiguration object for which you add an slmetric.config.Threshold object.

Data Types: char

Metric identifier for model metric or custom model metric that you create.

Example: 'mathworks.metrics.SimulinkBlockCount'

Data Types: char

slmetric.metric.Result property to which you apply thresholds. You can apply thresholds to the Value and AggregatedValue properties.

Output Arguments

expand all

slmetric.config.Threshold object for applying thresholds to either the Value or AggregatedValue properties of an slmetric.metric.Result object.


expand all

By default, an slmetric.config.Configuration object holds one slmetric.config.ThresholdConfiguration object. Use the getThresholdConfigurations method to add this object to the base workspace. Use the slmetric.config.addThreshold method to add slmetric.config.Threshold objects to this slmetric.config.ThresholdConfiguration object.

Create an slmetric.config.Configuration object.

CONF ='name', 'Config');

Get the default slmetric.config.ThresholdConfiguration object in CONF.

TC = getThresholdConfigurations(CONF);

Add an slmetric.config.Threshold object to the slmetric.config.ThresholdConfiguration object TC. This threshold is for the mathworks.metrics.SubSystemCount metric and the Value property of the slmetric.metric.Results object.

E = addThreshold(TC,'mathworks.metrics.SubSystemCount','Value');

Use the slmetric.config.Classification and slmetric.config.MetricRange classes to specify threshold values corresponding to the mathworks.metrics.SubsystemCount metric.

Version History

Introduced in R2018b