12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

surfacePurpose2surfaceCreate surface objectSyntaxDescriptionsurface(Z)surface(Z,C)surface(X,Y,Z)surface(X,Y,Z,C)surface(...'PropertyName',PropertyValue,...)h = surface(...)surface is the low-level function for creating surface graphics objects. surfacesare plots of matrix data created using the row and column indices of eachelement as the x- and y-coordinates and the value of each element as thez-coordinate.surface(Z) plots the surface specified by the matrix Z. Here, Z is asingle-valued function, defined over a geometrically rectangular grid.surface(Z,C) plots the surface specified by Z and colors it according to thedata in C (see “Examples”).surface(X,Y,Z) uses C = Z, so color is proportional to surface height above thex-y plane.surface(X,Y,Z,C) plots the parametric surface specified by X, Y and Z, withcolor specified by C.surface(x,y,Z), surface(x,y,Z,C) replaces the first two matrix argumentswith vectors and must have length(x) = n and length(y) = m where[m,n] = size(Z). In this case, the vertices of the surface facets are the triples(x(j),y(i),Z(i,j)). Note that x corresponds to the columns of Z and ycorresponds to the rows of Z. For a complete discussion of parametric surfaces,see the surf function.surface(...'PropertyName',PropertyValue,...) follows the X, Y, Z, and Carguments with property name/property value pairs to specify additionalsurface properties. These properties are described in the “Surface Properties”section.h = surface(...) returns a handle to the created surface object.2-474

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!