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.

trimeshPurpose2trimeshTriangular mesh plotSyntaxDescriptiontrimesh(Tri,X,Y,Z)trimesh(Tri,X,Y,Z,C)trimesh(...'PropertyName',PropertyValue...)h = trimesh(...)trimesh(Tri,X,Y,Z) displays triangles defined in the m-by-3 face matrix Trias a mesh. Each row of Tri defines a single triangular face by indexing into thevectors 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 thesurf function. <strong>MATLAB</strong> performs a linear transformation on this data toobtain colors from the current colormap.trimesh(...'PropertyName',PropertyValue...) specifies additional patchproperty names and values for the patch graphics object created by thefunction.h = trimesh(...) returns a handle to a patch graphics object.ExampleCreate 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 Alsopatch, trisurf, delaunay2-525

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

Saved successfully!

Ooh no, something went wrong!