Documentation

slmetric.metric.getAvailableMetrics

Package: slmetric.metric

Obtain available metrics

Syntax

IDs = slmetric.metric.getAvailableMetrics()
[IDs,props] = slmetric.metric.getAvailableMetrics()

Description

example

IDs = slmetric.metric.getAvailableMetrics() get metric identifiers for available metrics in the metric engine.

example

[IDs,props] = slmetric.metric.getAvailableMetrics() get metric identifiers and properties.

Examples

collapse all

This example shows how to obtain the available model metric IDs.

ID = slmetric.metric.getAvailableMetrics()
ID = 

    'mathworks.metrics.CyclomaticComplexity'
    'mathworks.metrics.DescriptiveBlockNames'
    'mathworks.metrics.IOCount'
    'mathworks.metrics.LayerSeparation'
    'mathworks.metrics.LibraryLinkCount'
    'mathworks.metrics.MatlabCodeAnalyzerWarnings'
    'mathworks.metrics.MatlabLOCCount'
    'mathworks.metrics.ModelAdvisorCheckCompliance.misra_c' 
    'mathworks.metrics.ModelAdvisorCheckCompliance.do178' 
    'mathworks.metrics.ModelAdvisorCheckCompliance.ISO26262' 
    'mathworks.metrics.ModelAdvisorCheckCompliance.maab' 
    'mathworks.metrics.ModelAdvisorCheckIssues.misra_c' 
    'mathworks.metrics.ModelAdvisorCheckIssues.do178' 
    'mathworks.metrics.ModelAdvisorCheckIssues.ISO26262' 
    'mathworks.metrics.ModelAdvisorCheckIssues.maab' 
    'mathworks.metrics.SimulinkBlockCount'
    'mathworks.metrics.StateflowChartObjectCount'
    'mathworks.metrics.StateflowLOCCount'
    'mathworks.metrics.SubSystemCount'
    'mathworks.metrics.SubSystemDepth'

This example shows how to obtain the available model metric properties.

[ID,PROPS]=slmetric.metric.getAvailableMetrics()
ID = 

 'mathworks.metrics.CyclomaticComplexity'
    'mathworks.metrics.DescriptiveBlockNames'
    'mathworks.metrics.IOCount'
    'mathworks.metrics.LayerSeparation'
    'mathworks.metrics.LibraryLinkCount'
    'mathworks.metrics.MatlabCodeAnalyzerWarnings'
    'mathworks.metrics.MatlabLOCCount'
    'mathworks.metrics.ModelAdvisorCheckCompliance.misra_c' 
    'mathworks.metrics.ModelAdvisorCheckCompliance.do178' 
    'mathworks.metrics.ModelAdvisorCheckCompliance.ISO26262' 
    'mathworks.metrics.ModelAdvisorCheckCompliance.maab' 
    'mathworks.metrics.ModelAdvisorCheckIssues.misra_c' 
    'mathworks.metrics.ModelAdvisorCheckIssues.do178' 
    'mathworks.metrics.ModelAdvisorCheckIssues.ISO26262' 
    'mathworks.metrics.ModelAdvisorCheckIssues.maab' 
    'mathworks.metrics.SimulinkBlockCount'
    'mathworks.metrics.StateflowChartObjectCount'
    'mathworks.metrics.StateflowLOCCount'
    'mathworks.metrics.SubSystemCount'
    'mathworks.metrics.SubSystemDepth'

PROPS = 

1x20 struct array with fields:

    Name
    Description
    IsBuiltIn
    Version

Output Arguments

collapse all

Metric identifiers in the metric engine.

Metric properties, returned as a structure array with the following fields:

NameName of the metric algorithm.
DescriptionDescription of the metric algorithm.
IsBuiltInBoolean indicating if the metric is included with Simulink® Check™.
VersionMetric algorithm version.

Data Types: struct

Introduced in R2016a

Was this topic helpful?