模型度量
收集模型合规性度量数据并创建自定义模型度量
您可以使用模型度量来评估模型和代码是否符合大小、复杂度和可读性要求。使用模型度量 API 创建自定义模型度量,计算度量结果,并导出度量数据。使用度量仪表板来可视化模型的度量数据和合规性状态。要快速入门,请参阅使用度量仪表板收集和探查度量数据。
类
函数
主题
探查度量数据
- 使用度量仪表板收集和探查度量数据
收集和查看用于质量评估的度量数据。 - Collect Model Metrics Programmatically
Use the model metric API to programmatically collect metrics for a model, such as subsystem and block counts. - 模型度量
MathWorks® 提供的模型度量,返回有关模型大小、复杂度、可读性以及标准和规范合规性的度量数据。 - Model Metric Data Aggregation
Options for defining model metric data aggregation and returning aggregated model metric results. - Identify Modeling Clones with the Metrics Dashboard
You can use the Metrics Dashboard tool to enable subsystem reuse by identifying exact graphical clones across a model hierarchy. - Collect Model Metrics Using the Model Advisor
Assess model size, complexity, and readability, using the Model Advisor to run model metric checks. - Collect Compliance Data and Explore Results in the Model Advisor
This example shows how to collect model metric data by using the Metrics Dashboard and explore detailed compliance results and, fix compliance issues by using the Model Advisor. - Collect Metric Data Programmatically and View Data Through the Metrics Dashboard
This example shows how to use the model metrics API to collect model metric data for your model, and then explore the results by using the Metrics Dashboard. - Fix Metric Threshold Violations in a Continuous Integration Systems Workflow
Use a continuous integration workflow to investigate whether your model violates metric threshold values. - Compare Model Complexity and Code Complexity Metrics
Assess the complexity of your system in model-based design.
自定义度量和仪表板功能
- Rearrange and Remove Widgets in Metrics Dashboard
Rearrange and remove widgets in the default Metrics Dashboard layout. - Modify, Remove, and Add Metric Thresholds in Metrics Dashboard
Customize metric thresholds for the Metrics Dashboard. - Change Model Advisor Checks in Metrics Dashboard
Create custom Model Advisor metrics and display the results in the Metrics Dashboard. - Create a Custom Model Metric for Nonvirtual Block Count
Create a new model metric by using theslmetric.metric.createNewMetricClass
function and defining the metric algorithm. - Create Layout with Custom Metric
Create a new Metrics Dashboard layout and add custom widgets. - Customize Metrics Dashboard Layout and Functionality
Configure compliance metrics, add metric thresholds, and customize Metrics Dashboard layout.