idxOut= findedge(G,s,t)returns the numeric edge indices,idxOut, for the edges specified by the source and target node pairss和t. The edge indices correspond to the rowsG.Edges.Edge(idxOut,:)in theG.Edgestable of the graph. An edge index of0指示图中不在图中的边缘。
可使ut graph, specified as either agraph或者digraphobject. Usegraphto create an undirected graph ordigraphto create a directed graph.
Example:G = graph(1,2)
Example:G = digraph([1 2],[2 3])
s,t—不de pairs 标量|vectors|character vectors|cell arrays of character vectors
不de pairs, specified as scalars, vectors, character vectors, or cell arrays of character vectors. Similarly located elements ins和tspecify the source and target nodes that form edges in the graph.
Edge indices, specified as a scalar or vector of positive integers. The edge index corresponds to a row in theG.Edgestable of the graph,G.Edges(idx,:).
边缘索引,作为非负整数的标量或向量返回。边缘索引对应于行G.Edgestable of the graph,G.Edges(idxOut,:). An edge index of0指示图中不在图中的边缘。
Sout,tOut— Node IDs 标量| vectors
不de IDs, returned as separate scalars or vectors of positive integers. Similarly located elements inSout和tOutspecify the source and target nodes that form the edgesG.Edges(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.