You can use the Model Advisor metrics to analyze the size, complexity, and readability of your model.
The results of these metrics can help you verify compliance with industry standards and guidelines.
You can run model metrics in the Model Advisor By Task > Model Metrics subfolder.
This example uses the
sldemo_fuelsys model to demonstrate how to
collect these metrics.
Open the sldemo_fuelsys model.
In the model window, open the Modeling tab and click Model Advisor. A System Selector — Model Advisor dialog box opens. Click OK.
In the left pane of the Model Advisor, navigate to By Task > Model Metrics. Select the Count Metrics, Complexity Metrics, and Readability Metrics checks.
Click Run Selected Checks.
After the Model Advisor runs an analysis, explore the metrics results by selecting a model metric in the left pane of the Model Advisor window. In the Count Metrics check, select Simulink block metric. A summary table lists the number of blocks at the root model level and subsystem level.
Alternatively, you can view the analysis results in the Model Advisor report.
You can use the metric results to help compare your model to industry recommendations for model size, complexity, and readability.