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

  26×1 cell array

    {'mathworks.metrics.CloneContent'                          }
    {'mathworks.metrics.CloneDetection'                        }
    {'mathworks.metrics.CyclomaticComplexity'                  }
    {'mathworks.metrics.DescriptiveBlockNames'                 }
    {'mathworks.metrics.DiagnosticWarningsCount'               }
    {'mathworks.metrics.ExplicitIOCount'                       }
    {'mathworks.metrics.FileCount'                             }
    {'mathworks.metrics.IOCount'                               }
    {'mathworks.metrics.LayerSeparation'                       }
    {'mathworks.metrics.LibraryContent'                        }
    {'mathworks.metrics.LibraryLinkCount'                      }
    {'mathworks.metrics.MatlabCodeAnalyzerWarnings'            }
    {'mathworks.metrics.MatlabFunctionCount'                   }
    {'mathworks.metrics.MatlabLOCCount'                        }
    {'mathworks.metrics.ModelAdvisorCheckCompliance.hisl_do178'}
    {'mathworks.metrics.ModelAdvisorCheckCompliance.maab'      }
    {'mathworks.metrics.ModelAdvisorCheckIssues.hisl_do178'    }
    {'mathworks.metrics.ModelAdvisorCheckIssues.maab'          }
    {'mathworks.metrics.ModelFileCount'                        }
    {'mathworks.metrics.ParameterCount'                        }
    {'mathworks.metrics.SimulinkBlockCount'                    }
    {'mathworks.metrics.StateflowChartCount'                   }
    {'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 =

  26×1 cell array

    {'mathworks.metrics.CloneContent'                          }
    {'mathworks.metrics.CloneDetection'                        }
    {'mathworks.metrics.CyclomaticComplexity'                  }
    {'mathworks.metrics.DescriptiveBlockNames'                 }
    {'mathworks.metrics.DiagnosticWarningsCount'               }
    {'mathworks.metrics.ExplicitIOCount'                       }
    {'mathworks.metrics.FileCount'                             }
    {'mathworks.metrics.IOCount'                               }
    {'mathworks.metrics.LayerSeparation'                       }
    {'mathworks.metrics.LibraryContent'                        }
    {'mathworks.metrics.LibraryLinkCount'                      }
    {'mathworks.metrics.MatlabCodeAnalyzerWarnings'            }
    {'mathworks.metrics.MatlabFunctionCount'                   }
    {'mathworks.metrics.MatlabLOCCount'                        }
    {'mathworks.metrics.ModelAdvisorCheckCompliance.hisl_do178'}
    {'mathworks.metrics.ModelAdvisorCheckCompliance.maab'      }
    {'mathworks.metrics.ModelAdvisorCheckIssues.hisl_do178'    }
    {'mathworks.metrics.ModelAdvisorCheckIssues.maab'          }
    {'mathworks.metrics.ModelFileCount'                        }
    {'mathworks.metrics.ParameterCount'                        }
    {'mathworks.metrics.SimulinkBlockCount'                    }
    {'mathworks.metrics.StateflowChartCount'                   }
    {'mathworks.metrics.StateflowChartObjectCount'             }
    {'mathworks.metrics.StateflowLOCCount'                     }
    {'mathworks.metrics.SubSystemCount'                        }
    {'mathworks.metrics.SubSystemDepth'                        }


PROPS = 

  1×26 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