主要内容

金宝appsimulink.findblocksoftype

金宝app楷模

描述

例子

bl= 金宝appsimulink.findblocksoftype(系统,,,,类型返回到模型或子系统中指定类型的所有块系统

例子

bl= 金宝appsimulink.findblocksoftype(系统,,,,类型,,,,选项符合A指定的标准查找目的。

bl= 金宝appsimulink.findblocksoftype(系统,,,,类型,param1,value1,...,paramn,valuen)找到其参数具有指定值的块。

bl= 金宝appsimulink.findblocksoftype(系统,,,,类型,param1,value1,...,paramn,valuen,选项查找其参数具有指定值的块,该块与A指定的标准匹配查找目的。

例子

全部收缩

在模型中找到所有类型增益的块VDP

load_system('vdp');金宝appsimulink.findblocksoftype('vdp',,,,'获得'
ANS = 7.0001

要返回块名而不是手柄,请使用getfullname

getfullname(金宝appsimulink.findblocksoftype('vdp',,,,'获得'))
ans ='vdp/mu'

加载模型sldemo_clutch。然后,创建一个查找对象并使用它来将模型中的goto块的搜索限制为解锁系统。

openexample('sldemo_clutch');f = 金宝appsimulink.findoptions('searchDepth',1);bl = 金宝appsimulink.findblocksoftype('sldemo_clutch/Unlocked',,,,'去',F)
BL = 166.0001 167.0001

输入参数

全部收缩

模型或子系统要查找块,指定为字符向量或字符串数​​组。

例子:'vdp'“ F14/飞机动力学模型”

块类型,指定为字符向量或字符串标量。利用get_param'blocktype'参数以获取块类型。

搜索约束,指定为金宝appsimulink.findoptions目的。

例子:金宝appsimulink.findoptions('SearchDepth',1)

输出参数

全部收缩

搜索结果,作为手柄阵列返回。

版本历史记录

在R2018A中引入