Showing points on a graph
1 view (last 30 days)
Show older comments
Rightia Rollmann
on 22 Jan 2017
Answered: Star Strider
on 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];
0 Comments
Accepted Answer
Star Strider
on 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
0 Comments
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!