Main Content

addLibraries

Class: Simulink.CloneDetection.Settings
Namespace: Simulink.CloneDetection

Add library with subsystems

Syntax

cloneDetectionSettings = addLibraries(cloneDetectionSettings,LibraryName)

Description

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

Input Arguments

expand all

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

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

Output Arguments

expand all

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

Examples

expand all

This example shows how to add a library file to a cloneDetectionSettings object. When you add a library file to the clone detection settings, the findClones function can find subsystem clones in the library. Suppose the library file is clones_library.

Save the library file name, clones_library, to the variable libName.

libName = 'clones_library';

Create a Simulink.CloneDetection.Settings object.

cloneDetectionSettings = Simulink.CloneDetection.Settings();

Add the library file name to the clone detection settings.

addLibraries(cloneDetectionSettings,libName);

The library file appears in the Libraries property in the clone detection settings.