Does the GPLOT function in MATLAB plot nodes in three-dimensions?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 2009
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!