Hauptinhalt

deleteMetrics

R2026b

Delete metric results for model testing artifacts

Since R2022a

Description

deleteMetrics(metricEngine,metricIDs) deletes the metric results that metricIDs identifies from the metricEngine object. To collect metric results for the metricEngine object, use the execute function. To view detailed results, use the generateReport function.

example

deleteMetrics(metricEngine,metricIDs,ScopeId=scopeId) limits the deletion to a specific artifact identified by its digital thread URI.

Examples

collapse all

To open the project, enter this command.

openExample('simulink/VisualizeModelReferenceHierarchiesExample')

Create a metric.Engine object.

metric_engine = metric.Engine();

To collect results for the metric OperatorCount, execute the metric engine.

execute(metric_engine,"OperatorCount");

Delete the metric results.

deleteMetrics(metric_engine,"OperatorCount")

Input Arguments

collapse all

Metric engine object for which to delete metric results, specified as a metric.Engine object.

Metric identifiers for metrics that you want to delete, specified as a character vector, cell array of character vectors, string scalar, or string array. For a list of design cost metrics, see Design Cost Model Metrics. For a list of model testing metrics and their identifiers, see Model Testing Metrics (Simulink Check).

Example: "DataSegmentEstimate"

Example: ["DataSegmentEstimate", "OperatorCount"]

Since R2026b

Digital thread URI for the artifact whose metric results you want to delete, specified as a string scalar. Use this argument to delete metric results only for the artifact that the URI identifies.

Example: "mwdigitalthread://myProject/myModel.slx#addr=myModel/123"

Data Types: string

Tips

  • If design changes are not reflected in the design cost metric results, first use the deleteMetrics function to delete the metric.Result object, then use the execute function to collect metrics.

  • The generateReport function requires that you execute metric collection in the current session. To recollect design cost metrics, first use the deleteMetrics function to delete the metric.Result object, then use the execute function to collect metrics.

Version History

Introduced in R2022a