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)
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 clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.