模型指标
收集模型合规性指标数据并创建自定义模型指标
您可以使用模型指标来评估模型和代码是否符合大小、复杂度和可读性要求。使用模型指标 API 创建自定义模型指标,计算指标结果,并导出指标数据。使用指标仪表板来可视化模型的指标数据和合规性状态。要快速入门,请参阅使用 Metrics Dashboard 收集和探查指标数据。
类
函数
主题
探查指标数据
- 使用 Metrics Dashboard 收集和探查指标数据
收集和查看用于质量评估的指标数据。 - Collect Model Metrics Programmatically
Use the model metric API to programmatically collect metrics for a model, such as subsystem and block counts. - Model Metrics
Model metrics provided by MathWorks® that return metric data on your model for size, complexity, readability, and compliance to standards and guidelines. - 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. - Create Layout with Custom Metric
Create a new Metrics Dashboard layout and add custom widgets. - 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. - Customize Metrics Dashboard Layout and Functionality
Configure compliance metrics, add metric thresholds, and customize Metrics Dashboard layout.