delete_block

Delete block from Simulink system

Syntax

delete_block('blk')

Description

delete_block('blk'), where blk is a full block pathname or a block handle, deletes the specified block from a system.

Examples

Remove the Out2 block from the vdp system. Open the vdp model and select the Out2 block. Enter:

delete_block('vdp/Out2')

Remove the Out1 block from the vdp system. Open the vdp model and select the Out1 block. Enter the following commands:

Out1_handle = get_param(gcb,'Handle')
Out1_handle =

   13.0010
delete_block(Out1_handle)
Was this topic helpful?