主要内容

金宝appSimulink.CloneDetection.findClones

在一个模型中找到克隆

自从R2021a

描述

cloneResults= 金宝appSimulink.CloneDetection.findClones (模型)查找并返回指定子系统克隆模型

cloneResults= 金宝appSimulink.CloneDetection.findClones (模型,cloneDetectionSettings)使用在指定的条件cloneDetectionSettings对象指定的模型

cloneResults= 金宝appSimulink.CloneDetection.findClones (cloneDetectionSettings)使用在指定的条件cloneDetectionSettings对象。

例子

全部折叠

这个例子展示了如何执行findClones功能和存储结果cloneResults对象。模型的一个例子,看到ex_detect_clones

openExample (“ex_detect_clones”)cloneResults = S金宝appimulink.CloneDetection.findClones (“ex_detect_clones”)
cloneResults =结果与属性:克隆:1×1 struct ExceptionLog:”
cloneResults.Clones
结果与属性:摘要:[1×1 struct] CloneGroups:[1×2结构)

这个例子展示了如何执行findClones使用定制的设置中指定的函数cloneDetectionSettings对象和改变财产的价值ParamDifferenceThreshold为零。

cloneDetectionSettings = 金宝appSimulink.CloneDetection.Settings ();cloneDetectionSettings。ParamDifferenceThreshold = 0;cloneResults = 金宝appSimulink.CloneDetection.findClones (“ex_detect_clones”cloneDetectionSettings)
cloneResults =结果与属性:克隆:1×1 struct ExceptionLog:”

这个例子展示了如何执行findClones使用定制的设置中指定的函数cloneDetectionSettings对象和提到的文件夹的名字文件夹财产。

cloneDetectionSettings = 金宝appSimulink.CloneDetection.Settings ();cloneDetectionSettings。文件夹= {“文件夹1”,“文件夹2”,'文件夹3 '};cloneResults = 金宝appSimulink.CloneDetection.findClones (cloneDetectionSettings)
cloneResults =结果与属性:克隆:1×1 struct ExceptionLog:”

输入参数

全部折叠

模型名称,指定为一个特征向量。

克隆检测设置,指定为一个金宝appSimulink.CloneDetection.Settings对象。

输出参数

全部折叠

确定克隆,作为一个返回金宝appSimulink.CloneDetection.Results对象。

版本历史

介绍了R2021a