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.

 採用された回答

Walter Roberson
Walter Roberson 2013 年 3 月 23 日

1 投票

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

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by