add_block
Add block to model
Syntax
Description
adds a copy of the block h
= add_block(source
,dest
)source
from a library or model to the
specified destination model and block name. This syntax creates the block at the same
location as it appears in the model or the library model.
If you are copying between models or from a library, load the destination model first.
duplicates an input port block in a subsystem, giving the destination block the same port
number as the source block. Duplicate an input port block to branch a signal from an input
port without creating a port or adding lines. For more information, see Create Duplicate Inport Blocks. h
= add_block(sourceIn
,destIn
,'CopyOption','duplicate')
uses
optional h
= add_block(___,Name,Value)Name,Value
arguments.
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 add_block
function, you can use block parameter and value
pairs. For a list of all the block parameters, see Common Block Properties and
Programmatically Specify Block Parameters and Properties.
Examples
Input Arguments
Output Arguments
Version History
Introduced before R2006a