I’m working a Matlab perform that finds all cycles in a directed graph. The issue is that generally the perform returns one vector, however generally it returns a number of vectors. Furthermore, the vectors are of various measurement, for instance, I get:
However generally I get as an alternative:
1 3 4
Query: Is there a easy strategy to retailer all of the solutions of a perform into an array? For instance, one thing like: b=findcycles(sparse(adj))? Presently I get the next error (independently of whether or not b is a vector or a matrix or every other object).
Error utilizing findcycles Too many output arguments.
For clarification, I write my code beneath. Many thanks.
> perform findcycles(G) > numNodes = measurement(G,1); >for n = 1:numNodes > [D,P]=graphtraverse(G,n); >for d = D > if G(d,n) > graphpred2path(P,d) > finish >finish >G(n,:)=0; >finish