File Exchange

image thumbnail

Simulink Model Size Metrics

version 1.0.0 (8.37 KB) by Sysenso Systems
getModelMetrics - Helps to find the size metrics of the given Model.


Updated 08 Feb 2020

View License

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.

>>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

>>modelMetrics = getModelMetrics('sldemo_autotrans')

Developed by: Sysenso Systems,

1.0 - Initial Version.

Cite As

Sysenso Systems (2020). Simulink Model Size Metrics (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2015b
Compatible with R2015b to any release
Platform Compatibility
Windows macOS Linux