Main Content


Class: Simulink.CloneDetection.Settings
Package: Simulink.CloneDetection

Add library with subsystems


cloneDetectionSettings = cloneDetectionSettings.addLibraries(LibraryName)


cloneDetectionSettings = cloneDetectionSettings.addLibraries(LibraryName) adds library file to the cloneDetectionSettings object.

Input Arguments

expand all

Name of the library file, specified as a character vector.

Output Arguments

expand all

Clone Detection Settings, specified as a Simulink.CloneDetection.Settings object.


  • This example shows how to add a library file to cloneDetectionSettings object for matching the library subsystem clones. The library file is TestLib_1.

    libName = 'TestLib_1';
    cloneDetectionSettings = Simulink.CloneDetection.Settings();
    cloneDetectionSettings = cloneDetectionSettings.addLibraries(libName);
    cloneDetectionSettings = 
      Settings with properties:
                                IgnoreSignalName: 0
                             IgnoreBlockProperty: 0
                          ExcludeModelReferences: 0
                             ExcludeLibraryLinks: 0
                          ExcludeInactiveRegions: 0
                        ParamDifferenceThreshold: 50
        ReplaceExactClonesWithSubsystemReference: 0
                                       Libraries: {'C:\Users\Desktop\ex_clone_detection\TestLib_1.slx'}