slmetric.metric.getAvailableMetrics
Package: slmetric.metric
(To be removed) Obtain available metrics
slmetric.metric.getAvailableMetrics
will be removed in a future
release. For size, architecture, and complexity metrics, use the metric.Engine
API and the model maintainability metrics instead. For more information, see metric.Engine
and
Collect Model Maintainability Metrics Programmatically.
Syntax
Description
Examples
Obtain Available Metric IDs for Model
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' }
Obtain Available Metric IDs and Metric Properties
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
IDs
— Metric identifiers
cell array of character vectors
Metric identifiers in the metric engine.
props
— Metric properties
structure array
Metric properties, returned as a structure array with the following fields:
Name | Name of the metric algorithm. |
Description | Description of the metric algorithm. |
IsBuiltIn | Boolean indicating if the metric is included with Simulink® Check™. |
Version | Metric algorithm version. |
Data Types: struct
Version History
Introduced in R2016aR2022a: Warns
The slmetric.Engine
API will be removed in a future release. For size,
architecture, and complexity metrics, use the metric.Engine
API and the model
maintainability metrics instead. For more information, see metric.Engine
and
Collect Model Maintainability Metrics Programmatically.
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)