slmetric.metric.getAvailableMetrics
Namespace: slmetric.metric
(To be removed) Obtain available metrics
The Metrics Dashboard user interface, metricdashboard
function, slmetric
package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.
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 Metrics Dashboard user interface, metricdashboard
function, slmetric
package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)