Main Content

removeThreshold

Class: slmetric.config.ThresholdConfiguration
Namespace: slmetric.config

(To be removed) Remove threshold object from threshold configuration object

The Metrics Dashboard user interface, metricdashboard function, slmetric package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.

Description

Remove a threshold object from a threshold configuration object.

example

removeThreshold(TC,T) removes the slmetric.config.Threshold object T from the slmetric.config.ThresholdConfiguration object TC.

Input Arguments

expand all

slmetric.config.ThresholdConfiguration object from which you want to remove an slmetric.config.Threshold object.

Data Types: char

slmetric.config.Threshold object that you want to remove from an slmetric.config.ThresholdConfiguration object.

Data Types: char

Examples

expand all

Use the getThresholds method to identify the slmetric.config.Threshold objects that belong to an slmetric.config.ThresholdConfiguration object. Then, use the removeThreshold method to remove an slmetric.config.Threshold object.

For the slmetric.config.ThresholdConfiguration object TC, use the getThresholds method.

A = getThresholds(TC)
A = 

  1×2 Threshold array with properties:

    MetricID
    AppliesTo

The slmetric.config.ThresholdConfiguration object TC contains two slmetric.config.Threshold objects.

Identify the slmetric.config.Threshold object that you want to remove from the slmetric.config.ThresholdConfiguration object.

A.MetricID
ans =

    'mathworks.metrics.SimulinkBlockCount'


ans =

    'mathworks.metricchecks.SubSystemCount'

Remove the second element of the array that corresponds to the mathworks.metricchecks.SubSystemCount metric.

removeThreshold(TC,A(2))

The slmetric.ThresholdConfiguration object now contains one slmetric.config.Threshold object corresponding to the mathworks.metricchecks.SubSystemCount metric.

getThresholds(TC)
ans = 

  Threshold with properties:

     MetricID: 'mathworks.metrics.SimulinkBlockCount'
    AppliesTo: 'Value'

Version History

Introduced in R2018b

collapse all

R2022a: Metrics Dashboard will be removed

The Metrics Dashboard user interface, metricdashboard function, slmetric package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.