replace_block
Replace blocks in金宝appmodel
Syntax
Description
replaces the blocksreplBlks
= replace_block(sys
,current
,新的
)current
in the modelsys
with blocks of type新的
。您可以使用Simulink的块金宝app®库或另一个模型作为替换块。
加载模型sys
before using this function. The function prompts you to select the blocks you want to replace from a list of blocks that match thecurrent
争论。
Tip
在使用此命令之前保存模型。
replaces the blocks that match the block parameters specified by thereplBlks
= replace_block(sys
,Name,Value
,新的
)Name,Value
pair arguments. You can also usefind_system
Name,Value
pairs to qualify the search for blocks to replace.
将可选的参数对Name1=Value1,...,NameN=ValueN
, whereName
is the argument name and价值
is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.
Before R2021a, use commas to separate each name and value, and encloseName
in quotes.
与replace_block
function, you can use block parameter and value pairs. For a list of all the block parameters, seeCommon Block Properties和特定于块的参数。
要指定有关要替换块的搜索块的其他信息,您可以使用find_system
Name,Value
在块参数之前对。例如,您可以使用'CaseSensitive','off'
为了搜索块案例不敏感或'FollowLinks','on'
to follow links into library links. Seefind_system
对于那个清单Name,Value
pairs.