Main Content

Simulink.CloneDetection.replaceClones

Replace clones in a model

Description

cloneReplacementResults = Simulink.CloneDetection.replaceClones(cloneResults) replaces clones and returns the cloneReplacementResults object for the specified cloneResults.

cloneReplacementResults = Simulink.CloneDetection.replaceClones(cloneResults,cloneReplacementConfig) uses the replacement configurations specified in cloneReplacementConfig.

Examples

collapse all

This example shows how to execute replaceClones function using cloneResults object and store the results to cloneReplacementResults object.

cloneReplacementResults = Simulink.CloneDetection.replaceClones(cloneResults)
cloneReplacementResults =

  ReplacementResults with properties:

    ReplacedClones: [1×5 struct]
    ExcludedClones: {}

This example shows how to execute replaceClones function using the replacement configurations specified in cloneReplacementConfig object.

cloneReplacementResults = Simulink.CloneDetection.replaceClones(cloneResults, cloneReplacementConfig)
cloneReplacementResults =

  ReplacementResults with properties:

    ReplacedClones: [1×4 struct]
    ExcludedClones: [1×1 struct]

Input Arguments

collapse all

Clones identified in a model, specified as a Simulink.CloneDetection.Results object.

Settings to use to replace clones, specified as a Simulink.CloneDetection.ReplacementConfig object.

Output Arguments

collapse all

Clones replaced in the model, returned as a Simulink.CloneDetection.ReplacementResults object.

Introduced in R2021a