Documentation

delete_line

Delete line from Simulink system

Syntax

delete_line('model','outPort','inPort')
delete_line('model',[x y])
delete_line(lineHandle)

Description

delete_line('sys','oport','iport') deletes the line extending from the specified block output port oport to the specified block input port iport. oport and iport are character vectors consisting of a block name and a port identifier in the form block/port. Most block ports are identified by numbering the ports from top to bottom or from left to right, such as Gain/1 or Sum/2. Enable, Trigger, and State ports are identified by name, such as subsystem_name/Enable, subsystem_name/Trigger, Integrator/State, or if_action_subsystem_name/Ifaction.

delete_line('sys',[x y]) deletes one of the lines in the system that contains the specified point (x,y), if any such line exists.

delete_line(LineHandle) deletes the line specified by the handle.

Examples

collapse all

For the model vdp, remove the line connecting the Product block with the Gain block.

load_system('vdp');
delete_line('vdp','Product/1','Mu/1');

For the model sldemo_househeat, remove the line, inside the Heater subsystem, connecting the first output of the HeatGain block to the second input of the Heater Switch block.

load_system('sldemo_househeat');
delete_line('sldemo_househeat/Heater','HeatGain/1','Heater Switch/2');

For the model vdp, remove a line using the line handle.

load_system('vdp');
mu_LineHandles = get_param('vdp/Mu','LineHandles');
delete_line(mu_LineHandles.Outport(1));

See Also

Introduced before R2006a

Was this topic helpful?