Add line to Simulink system
h = add_line('
sys','oport','iport') h = add_line('
sys','oport','iport', 'autorouting','on') h = add_line('
add_line command adds a line to the specified
system and returns a handle to the new line. You can define the line
in two ways:
By naming the block ports that are to be connected by the line
By specifying the location of the points that define the line segments
add_line(' adds a straight line to a system from the specified
block output port
'oport' to the specified block
strings consisting of a block name and a port identifier in the form
Most block ports are identified by numbering the ports from top to
bottom or from left to right, such as
Enable, Trigger, State, and Action ports are identified by name, such
add_line(' works like
that it routes the line around intervening blocks. The default value
for autorouting is
add_line(system, points) adds a segmented
line to a system. Each row of the
specifies the x and y coordinates
of a point on a line segment. The origin is the top-left corner of
the window. The signal flows from the point defined in the first row
to the point defined in the last row. If the start of the new line
is close to the output of an existing block or line, a connection
is made. Likewise, if the end of the line is close to an existing
input, a connection is made.
This command adds
a line to the
mymodel system connecting the output
of the Sine Wave block to the first input of the Mux block.
This command adds a line to the
extending from (
20,55) to (
add_line('mymodel',[20 55; 40 10; 60 60])