Effacer les filtres
Effacer les filtres

Showing points on a graph

1 vue (au cours des 30 derniers jours)
Rightia Rollmann
Rightia Rollmann le 22 Jan 2017
I want to show three points on a 3D graph. x, y, and z show the x, y, and z coordinates of point1, point2, and point3, respectively. How?
x = [1 2 3]; y = [4 5 6]; z = [7 8 9];

Réponse acceptée

Star Strider
Star Strider le 22 Jan 2017
I prefer stem3 for these, but plot3 or scatter3 (or a combination of them) will also work, depending on what you want to do.
The Code:
x = [1 2 3];
y = [4 5 6];
z = [7 8 9];
figure(1)
stem3(x, y, z)
grid on

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by