Main Content

Clone Content Metric

Metric ID

Metric ID: mathworks.metrics.CloneContent


Metric Type: Architecture

Use this metric to calculate the fraction of the total number of subcomponents that are clones. Clones must have identical block types and connections but they can have different parameter values. For more information on clone detection, see Enable Component Reuse by Using Clone Detection.

This metric is available with Simulink® Check™. To collect data for this metric, use getMetrics with the metric identifier, mathworks.metrics.CloneContent.

The slmetric.metric.AggregationMode property setting is None.

Computation Details

  • Analyzes content in masked subsystems.

  • If specified, analyzes the content of library-linked blocks or referenced models.


For this metric, instances of slmetric.metric.Result provide the following results:

  • Value: Fraction of total number of subcomponents that are clones

  • AggregatedValue: Not applicable.

  • Measures: Vector containing number of clones, total number of components, and clone group number.

See Also

Related Topics