Model Size Metrics for Simulink

getModelMetrics - Helps to find the size metrics of the given Model.

https://github.com/SysensoSystems/ModelMetrics

You are now following this Submission

Use cases: This metric can be used to compare two models for its complicity in-terms of size and used for time estimation to work on the model.
Usage Instructions:
Note: Add the utils and its sub folders into MATLAB path before calling the getModelMetrics function.
Syntax:
>>modelMetrics = getModelMetrics(<'ModelName'>)
modelMetrics - structure contains following details.
modelMetrics.totalBlocksCount - number of blocks in the model
modelMetrics.subsystemCount - number of Subsystems in the model
modelMetrics.libraryBlockCount - number of libarary blocks in the model
modelMetrics.userDefinedBlockCount - number of User-Defined Libaray blocks in the model
modelMetrics.modelReferenceBlockCount - number of ModelReferenced blocks in the model
modelMetrics.portBlocksCount - number of PortBlocks in the model
modelMetrics.stateFlowBlockCount - number of StateFlow blocks in the model
modelMetrics.modelHierarchicalDepth - the HierarchicalDepth of the model
modelMetrics.totalEffectiveLines - number of EffectiveLines in the model
modelMetrics.modelParameters - list the model parameters from base, model and masked workspace
Example:
>>modelMetrics = getModelMetrics('sldemo_autotrans')
Developed by: Sysenso Systems, https://sysenso.com/
Contact: contactus@sysenso.com
Version:
1.0 - Initial Version.

Cite As

Sysenso Systems (2026). Model Size Metrics for Simulink (https://github.com/SysensoSystems/ModelMetrics), GitHub. Retrieved .

Categories

Find more on Simulation in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with R2015b and later releases

Platform Compatibility

  • Windows
  • macOS
  • Linux

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes Action
1.0.1

Connected with github repository.

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.