Triangular mesh plot
Syntax
trimesh(Tri,X,Y,Z)
trimesh(Tri,X,Y,Z,C)
trimesh(...'PropertyName',PropertyValue...)
h = trimesh(...)
Description
trimesh(Tri,X,Y,Z)
displays triangles defined in the m-by-3 face matrix Tri as a mesh. Each row of Tri defines a single triangular face by indexing into the vectors or matrices that contain the X, Y, and Z vertices.
trimesh(Tri,X,Y,Z,C)
specifies color defined by C in the same manner as the surf function. MATLAB performs a linear transformation on this data to obtain colors from the current colormap.
trimesh(...'PropertyName',PropertyValue...)
specifies additional Patch property names and values for the Patch graphics object created by the function.
h = trimesh(...)
returns a handle to a Patch graphics object.
Example
Create vertex vectors and a face matrix, then create a triangular mesh plot.
x = rand(1,50);
y = rand(1,50);
z = peaks(6*x-3,6*x-3);
tri = delaunay(x,y);
trimesh(tri,x,y,z)
See Also
patch, trisurf, delaunay
[ Previous | Help Desk | Next ]