Filter löschen
Filter löschen

Showing points on a graph

1 Ansicht (letzte 30 Tage)
Rightia Rollmann
Rightia Rollmann am 22 Jan. 2017
Beantwortet: Star Strider am 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];

Akzeptierte Antwort

Star Strider
Star Strider am 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

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots 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!

Translated by