allpaths
Description
[___] = allpaths(
specifies additional options using one or more name-value arguments. You can use any of the
output argument combinations in previous syntaxes. For example, you can specify
G,s,t,Name,Value)MaxNumPaths and a scalar to limit the number of paths returned.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Tips
The number of paths in a graph depends heavily on the structure of the graph. For some graph structures, the number of paths can grow exponentially with the number of nodes. For example, a complete graph with 12 nodes given by
G = graph(ones(12))contains nearly 10 million paths between any two of its nodes. Use theMaxNumPaths,MaxPathLength, andMinPathLengthname-value pairs to control the output ofallpathsin these cases.
Version History
Introduced in R2021a


