Main Content

slmetric.metric.registerMetric

Namespace: slmetric.metric

(To be removed) Register a custom model metric with the model metric repository

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

[MetricID,err_msg] = slmetric.metric.registerMetric(classname) register a custom model metric with the model metric repository. The new metric class must be on the MATLAB® search path and derived from slmetric.metric.Metric.

example

Examples

collapse all

This example shows how to register a custom model metric.

Create a new metric class, derived from slmetric.metric.Metric, called my_metric.

slmetric.metric.createNewMetricClass('my_metric')

Finish the custom model metric implementation and testing.

Register the new custom metric in the model metric repository.

[MetricID, err_msg] = slmetric.metric.registerMetric('my_metric');

Input Arguments

collapse all

New metric class name.

Data Types: char

Output Arguments

collapse all

Unique metric identifier.

Data Types: char

If you cannot register a new class, the function returns an error message.

Data Types: char

Version History

Introduced in R2016a

collapse all

R2022a: Warns

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.