This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

slmetric.metric.registerMetric

Package: slmetric.metric

Register a custom model metric with the model metric repository

Syntax

[MetricID,err_msg] = slmetric.metric.registerMetric(classname)

Description

example

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

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

Introduced in R2016a