% lect11_2: Example of mesh and surface plots % Step 1: Make the grid x = -1:3; y = 1:4; [X, Y] = meshgrid(x, y); % Step 2: Find the z values Z = X.*Y.^2./(X.^2 + Y.^2); % Step 3: Draw the plots mesh(X, Y, Z) % surf(X, Y, Z) xlabel('x'); ylabel('y'); zlabel('z');