% lect11_3: Variations of mesh and surface plots % Reset colormap from previous script colormap('default'); % Define the domain, the grid, and calculate z values 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); % Basic mesh plot mesh(X, Y, Z); xlabel('x'); ylabel('y'); zlabel('z'); pause % Basic surface plot surf(X, Y, Z); xlabel('x'); ylabel('y'); zlabel('z'); pause % Mesh curtain plot meshz(X, Y, Z); xlabel('x'); ylabel('y'); zlabel('z'); pause % Mesh and contour plot meshc(X, Y, Z); xlabel('x'); ylabel('y'); zlabel('z'); pause % Surface and contour plot surfc(X, Y, Z); xlabel('x'); ylabel('y'); zlabel('z'); pause % Surface plot with lighting surfl(X, Y, Z); xlabel('x'); ylabel('y'); zlabel('z'); pause % 3D contour plot contour3(X, Y, Z, 15); xlabel('x'); ylabel('y'); zlabel('z'); pause % 2D contour plot contour(X, Y, Z, 15); xlabel('x'); ylabel('y'); zlabel('z'); pause