Main Content


Package: slmetric.metric

Register a custom model metric with the model metric repository



[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.


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.


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