labeledge(H,s,t,Labels)
labels the edges specified by (s,t) node pairs with the character
vectors or strings contained in Labels. The lengths of
s, t, and Labels must
be equal, or Labels can be scalar. If there are multiple edges
between s and t, then the same label is
applied to all of them.
Input graph plot, specified as a GraphPlot object. Use the graph or digraph functions to create a graph, and
then use plot with an output argument to return
a GraphPlot object.
Example: H = plot(G)
s,t — Node pairs (as separate arguments) node indices | node names
Node pairs, specified as separate arguments of node indices or node names.
Similarly located elements in s and t
specify the source and target nodes for edges in the graph.
This table shows the different ways to refer to one or more nodes either by their numeric node indices or by their node names.
Edge indices, specified as a scalar, vector of positive integers, or
logical vector.
A vector of positive integers specifies edge indices for a
graph G corresponding to rows in the table
G.Edges, such that
G.Edges(idx,:) returns the end nodes of
the edge. In this form, the maximum value for
idx is numedges(G),
and the number of selected nodes is equal to the number of
indices in idx.
A logical vector specifies whether each edge is labeled. In
this form, the length of the logical vector must be
numedges(G), and the number of selected
nodes is equal to the number of nonzero indices in
idx.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.