% lect11_5: Controlling the view % Set up initial plot x = -3:0.25:3; y = -3:0.25:3; [X, Y] = meshgrid(x, y); Z = 1.8.^(-1.5*sqrt(X.^2+Y.^2)).*cos(0.5*Y).*sin(X); % Surface plot surf(X, Y, Z) xlabel('x'); ylabel('y'); zlabel('z'); pause % Change the view view(20, 35) pause % Projection on x-y plane: top view title('Top view') view(0, 90) pause % Projection on x-z plane: side view title('Side view') view (0, 0) pause % Projection on y-z plane: side view title('Side view') view (90, 0) pause % Rotate the view until CTRL C typed az = -37.5; delta_az = 10; while 1 az view (az, 30); az = az + delta_az; pause(1); end % Now try the Plot Editor...