Replace blocks in Simulink model
replaces
the blocks replBlks
= replace_block(sys
,current
,new
)current
in the model sys
with
blocks of type new
. You can use a block from
a Simulink® library or from another model as the replacement block.
Load the model sys
before using this function.
The function prompts you to select the blocks you want to replace
from a list of blocks that match the current
argument.
Tip
Save the model before using this command.
replaces
the blocks that match the block parameters specified by the replBlks
= replace_block(sys
,Name,Value
,new
)Name,Value
pair
arguments. You can also use find_system
Name,Value
pairs
to qualify the search for blocks to replace.
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
With the replace_block
function, you can
use block parameter and value pairs. For a list of all the block parameters,
see Common Block Properties and Block-Specific Parameters.
To specify additional information about the search for blocks
to replace, you use find_system
Name,Value
pairs
before the block parameters. For example, you can use 'CaseSensitive','off'
to
make the search for blocks case insensitive or 'FollowLinks','on'
to
follow links into library links. See find_system
for
that list of Name,Value
pairs.