-
Notifications
You must be signed in to change notification settings - Fork 9
surf
The surf function displays both the connecting lines and the faces of the surface in color.
Creates a three-dimensional shaded surface from the z components in matrix Z, using x = 1:n and y = 1:m, where [m, n] = size(Z). The height, Z, is a single-valued function defined over a geometrically rectangular grid. Z specifies the color data, as well as surface height, so color is proportional to surface height.
Argument Z
Matrix
Returns 1. entry
SurfacePlot
Uses Z for the color data and surface height. X and Y are vectors or matrices defining the x and y components of a surface. If X and Y are vectors, length(X) = n and length(Y) = m, where [m, n] = size(Z). In this case, the vertices of the surface faces are (X(j), Y(i), Z(i,j)) triples. To create X and Y matrices for arbitrary domains, use the meshgrid function.
Argument X
Matrix
Argument Y
Matrix
Argument Z
Matrix
Returns 1. entry
SurfacePlot
[X, Y] = meshgrid(-8:.5:8); R = sqrt(X.^2 + Y.^2); Z = sin(R)./R; surf(X, Y, Z);
Evaluates sin(r)/r, or the so called sinc function as a surface plot.