Main Content

Simulink.CloneDetection.ReplacementResults class

Package: Simulink.CloneDetection

Results of replace clones

Description

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

Creation

Description

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.

Properties

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

Examples

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: {}
    cloneReplacementResults.ReplacedClones
  2. To view the ReplacedClones field.

      ans =
        1×5 struct array with fields:
        Name
        ReferenceSubsystem
Introduced in R2021a