Text exceeds maximum line length of 25,000 characters for Command Window display.
2 views (last 30 days)
Show older comments
I'm building a directed graph with about 16,000 nodes and 70,000 edges and I would like to run the graphallshortestpaths function. The graph is acyclic and unweighted (I have a weighting matrix of all 1's anyway).
I entered into the command window:
>> W = [1 1 1 1 ...1] (this is the weighting matrix.
>> DG = sparse([1 1 3 4 5 6 ... 68201],[46 809 47088 2281 ... 5006],W)
However, when I try to show DG, I get the following error message:
(first 25000 characters of intended output) Output truncated. Text exceeds maximum line length of 25,000 characters for Command Window display. >> >>
Is there any workaround that would let me work with this entire graph?
0 Comments
Answers (1)
Nade Sritanyaratana
on 6 Aug 2014
How are you showing DG? It sounds like you are trying to display this entire graph in the command window.
The error only pertains to the display. You can try printing parts of the graph into the command window if this is what you wish; there's an article that also discusses this error further .
However, if you are hoping to display DG, you may want to use something like the view / biograph functions, as in this example inside the graphallshortestpaths documentation page .
e.g.,
>> view(biograph(DG,[],'ShowWeights','on'))
Lastly, if you are looking for a command window-like output, you can also try printing the entire output of DG to a textfile using fprintf.
2 Comments
Nade Sritanyaratana
on 6 Aug 2014
Can you please attach the inputs you are using for i, j, and W? It would be useful to see the inputs you are using for sparse:
>> DG = sparse(i,j,W)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!