Text exceeds maximum line length of 25,000 characters for Command Window display.
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Nade Sritanyaratana
2014 年 8 月 6 日
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 件のコメント
Nade Sritanyaratana
2014 年 8 月 6 日
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)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!