Help with a 3-D plot

I have written a code that simulates the flight of a golf ball. I currently have 6 subplots, (5 are 2-D, 1 is a 3-D plot). For the 3-D plot, how would I add a mesh or lines, so that it is easier to tell where the line ends? Currently, it has an x-y-z axis, but i have trouble telling where the ball lands if i add any curve to the flight.
My 3-d plot code:
subplot(2,3,6), plot3(x,y,z);
title('3-D Plot of flight');
xlabel('X-Distance, m');
ylabel('Y-Distance, m');
zlabel('Z-Distance, m');
x, y, and z are the matrices/vectors of the locations for times 0<t, until z = 0. All are equal length, since my code updates by .01 seconds until the height (z) equals 0.

 采纳的回答

You could try
set(gca, 'Xgrid', 'on', 'Ygrid', 'on')
possibly even Zgrid as well, unless the landing is always at the same height.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Axis Labels 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by