主要内容

removeThreshold

类: slmetric.config.ThresholdConfiguration
命名空间: slmetric.config

(即将删除)从阈值配置对象中删除阈值对象

以后的版本中将会删除度量仪表板用户界面、metricdashboard 函数、slmetric 包 API 以及相应的自定义项。有关详细信息,请参阅Migrating from Metrics Dashboard to Model Maintainability Dashboard

说明

从阈值配置对象中删除阈值对象。

removeThreshold(TC,T)slmetric.config.ThresholdConfiguration 对象 TC 中删除 slmetric.config.Threshold 对象 T

示例

输入参数

全部展开

您要从中删除 slmetric.config.Threshold 对象的 slmetric.config.ThresholdConfiguration 对象。

数据类型: char

您要从 slmetric.config.ThresholdConfiguration 对象中删除的 slmetric.config.Threshold 对象。

数据类型: char

示例

全部展开

使用 getThresholds 方法来识别属于 slmetric.config.ThresholdConfiguration 对象的 slmetric.config.Threshold 对象。然后,使用 removeThreshold 方法删除一个 slmetric.config.Threshold 对象。

对于 slmetric.config.ThresholdConfiguration 对象 TC,请使用 getThresholds 方法。

A = getThresholds(TC)
A = 

  1×2 Threshold array with properties:

    MetricID
    AppliesTo

slmetric.config.ThresholdConfiguration 对象 TC 包含两个 slmetric.config.Threshold 对象。

识别您要从 slmetric.config.ThresholdConfiguration 对象中删除的 slmetric.config.Threshold 对象。

A.MetricID
ans =

    'mathworks.metrics.SimulinkBlockCount'


ans =

    'mathworks.metricchecks.SubSystemCount'

删除数组中与 mathworks.metricchecks.SubSystemCount 度量相对应的第二个元素。

removeThreshold(TC,A(2))

slmetric.ThresholdConfiguration 对象现在包含一个与 mathworks.metricchecks.SubSystemCount 度量对应的 slmetric.config.Threshold 对象。

getThresholds(TC)
ans = 

  Threshold with properties:

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

版本历史记录

在 R2018b 中推出

全部折叠