Main Content

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

Simulink.CloneDetection.findClones

모델에서 클론 찾기

R2021a 이후

설명

cloneResults = Simulink.CloneDetection.findClones(model)는 지정된 model에 대한 하위 시스템 복제본을 찾아 반환합니다.

cloneResults = Simulink.CloneDetection.findClones(model,cloneDetectionSettings)는 지정된 model에 대해 cloneDetectionSettings 개체에 지정된 조건을 사용합니다.

cloneResults = Simulink.CloneDetection.findClones(cloneDetectionSettings)cloneDetectionSettings 객체에 지정된 조건을 사용합니다.

예제

모두 축소

이 예에서는 findClones 함수를 실행하고 결과를 cloneResults 개체에 저장하는 방법을 보여줍니다. 예제 모델은 ex_detect_clones를 참조하세요.

openExample('ex_detect_clones')
cloneResults = Simulink.CloneDetection.findClones('ex_detect_clones')
cloneResults =

  Results with properties:

    Clones: [1×1 struct]
    ExceptionLog: ''
cloneResults.Clones 
  Results with properties:

        Summary: [1×1 struct]
    CloneGroups: [1×2 struct]

이 예에서는 cloneDetectionSettings 개체에 지정된 사용자 정의 설정을 사용하여 findClones 기능을 실행하고 ParamDifferenceThreshold 속성의 값을 0으로 변경하는 방법을 보여줍니다.

cloneDetectionSettings = Simulink.CloneDetection.Settings();
cloneDetectionSettings.ParamDifferenceThreshold = 0; 

cloneResults = Simulink.CloneDetection.findClones('ex_detect_clones', cloneDetectionSettings)
cloneResults =

  Results with properties:

    Clones: [1×1 struct]
    ExceptionLog: ''

이 예에서는 cloneDetectionSettings 개체에 지정된 사용자 정의 설정을 사용하여 findClones 기능을 실행하고 Folders 속성에 폴더 이름을 언급하는 방법을 보여줍니다.

cloneDetectionSettings = Simulink.CloneDetection.Settings();
cloneDetectionSettings.Folders = {'Folder 1', 'Folder 2', 'Folder 3'};

cloneResults = Simulink.CloneDetection.findClones(cloneDetectionSettings)

cloneResults =

  Results with properties:

    Clones: [1×1 struct]
    ExceptionLog: ''

입력 인수

모두 축소

모델 이름으로, 문자형 벡터로 지정됩니다.

복제 감지 설정은 Simulink.CloneDetection.Settings 개체로 지정됩니다.

출력 인수

모두 축소

식별된 복제본으로, Simulink.CloneDetection.Results 객체로 반환됩니다.

버전 내역

R2021a에 개발됨