Azzera filtri
Azzera filtri

Showing points on a graph

1 visualizzazione (ultimi 30 giorni)
Rightia Rollmann
Rightia Rollmann il 22 Gen 2017
Risposto: Star Strider il 22 Gen 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];

Risposta accettata

Star Strider
Star Strider il 22 Gen 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

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by