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!