Does the GPLOT function in MATLAB plot nodes in three-dimensions?

조회 수: 1 (최근 30일)
The documentation for the GPLOT function specifies that the coordinates can be given as "an n-by-2 or an n-by-3 matrix, where n is the number of nodes and each coordinate pair or triple represents one node." However, if I provide an n-by-3 matrix, GPLOT only plots in two-dimensions.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This has been verified as an error within the documentation for the GPLOT function in MATLAB. Although GPLOT does accept an n-by-3 matrix (as is necessary for the BuckyBall example), it does not utilize this third column.
Currently, to workaround this issue, you can use the following code in place of a call to GPLOT:
[A, xy] = bucky;
[i, j] = find(triu(A));
X = permute(cat(3, xy(i, :),xy(j, :)), [3 1 2]);
plot3(X(:, :, 1), X(:, :, 2), X(:, :, 3))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

제품


릴리스

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by