Main Content

Simulink.CloneDetection.ReplacementResults Class

Namespace: Simulink.CloneDetection

Results of replace clones

Since R2021a


Use objects of the Simulink.CloneDetection.ReplacementResults class to view the results of a clone replacement operation.



The Simulink.CloneDetection.replaceClones function creates an object of the Simulink.CloneDetection.ReplacementResults class when executed. You can use this object as the input argument of the Simulink.CloneDetection.checkEquivalency function.


expand all

Name list of the replaced clones and reference subsystem, specified as array of character vector.

  • Name — Name of the replaced subsystem clone

  • ReferenceSubsystem — Subsystem used to replace clone

Name list of the excluded clones and reason for exclusion, specified as array of character vector.

  • Name — Name of the excluded subsystem clone

  • ReasonForExclusion — Reason for excluding from clone replacement


collapse all

This example shows how to analyze the results of replace clones operation.

The replace clones function stores the information in cloneReplacementResults object.

  1. cloneReplacementResults = Simulink.CloneDetection.replaceClones(cloneResults)
    cloneReplacementResults = 
      ReplacementResults with properties:
        ReplacedClones: [1×5 struct]
        ExcludedClones: {}
  2. To view the ReplacedClones field.

      ans =
        1×5 struct array with fields:

Version History

Introduced in R2021a