Simulink Reference    
add_block

Add a block to a Simulink system.

Syntax

Description

add_block('src', 'dest') copies the block with the full pathname 'src' to a new block with the full path name 'dest'. The block parameters of the new block are identical to those of the original. The name 'built-in' can be used as a source system name for all Simulink built-in blocks (blocks available in Simulink block libraries that are not masked blocks).

add_block('src', 'dest_obj', 'parameter1', value1, ...) creates a copy as above, in which the named parameters have the specified values. Any additional arguments must occur in parameter/value pairs.

Examples

This command copies the Scope block from the Sinks subsystem of the simulink system to a block named Scope1 in the timing subsystem of the engine system.

This command creates a new subsystem named controller in the F14 system.

This command copies the built-in Gain block to a block named Volume in the mymodel system and assigns the Gain parameter a value of 4.

See Also


  Model Construction Commands add_line