% plot3 - 3D plotting Example % Author: F.P. Schloerb % define a set of arrays with x, y, and z coordinates % this is a 3D spiral t = 0:1000; r = 0.01*t; x = r.*cos(2*pi*t/100); y = r.*sin(2*pi*t/100); z = 0.1*t; % now plot the 3D function using plot3 plot3(x,y,z,'k','LineWidth',2) % label the plot xlabel('X') ylabel('Y') zlabel('Z') title('Spiral Plot in 3D')