slmetric.metric.getAvailableMetrics
命名空间: slmetric.metric
(将删除)获取可用度量
以后的版本中将会删除度量仪表板用户界面、metricdashboard
函数、slmetric
包 API 以及相应的自定义项。有关详细信息,请参阅Migrating from Metrics Dashboard to Model Maintainability Dashboard。
说明
示例
获取模型的可用度量 ID
此示例说明如何获得可用的模型度量 ID。
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' }
获取可用的度量 ID 和度量属性
此示例说明如何获取可用的模型度量属性。
[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
输出参量
IDs
— 度量标识符
字符向量元胞数组
度量引擎中的度量标识符。
props
— 度量属性
结构体数组
度量属性,以包含下列字段的结构体数组形式返回:
名称 | 度量算法的名称。 |
描述 | 度量算法的说明。 |
IsBuiltIn | 布尔值,指示 Simulink® Check™ 是否附带该度量。 |
版本 | 度量算法版本。 |
数据类型: struct
版本历史记录
在 R2016a 中推出R2022a: 警告
以后的版本中将会删除度量仪表板用户界面、metricdashboard
函数、slmetric
包 API 以及相应的自定义项。有关详细信息,请参阅Migrating from Metrics Dashboard to Model Maintainability Dashboard。
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 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)