Delete blocks from Simulink system
Delete the block Mu from the
Delete the block Out2 from the
using the block handle.
Interactively select the block Out1. Get the block's
handle and assign it to the variable
Delete the block using the handle.
Out1_handle = get_param(gcb,'Handle'); delete_block(Out1_handle)
Delete three blocks from the
vdp system. Add three blocks
and assign their handles to variables.
open_system('vdp') Constant_handle = add_block('built-in/Constant','vdp/MyConstant'); Gain_handle = add_block('built-in/Gain','vdp/MyGain'); Outport_handle = add_block('built-in/Outport','vdp/MyOutport');
Delete the blocks you added using a vector of handles.
delete_block([Constant_handle Gain_handle Outport_handle])
blockArg— Blocks to delete
Blocks to delete, specified as the full block path name, a handle, a vector of handles, or a 1-D cell array of handles or block path names.