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.

surfacethe CData is a 200-by-320 matrix. You must set the surface’s FaceColor totexturemap to use ZData and CData of different dimensions.load clownsurface(peaks,flipud(X),...'FaceColor','texturemap',...'EdgeColor','none',...'CDataMapping','direct')colormap(map)view(-35,45)Note the use of the surface(Z,C) convenience form combined with propertyname/property value pairs.Since the clown data (X) is typically viewed with the image command, which<strong>MATLAB</strong> normally displays with 'ij' axis numbering and directCDataMapping, this example reverses the data in the vertical direction usingflipud and sets the CDataMapping property to direct.See AlsoColorSpec, mesh, patch, pcolor, surf2-476

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

Saved successfully!

Ooh no, something went wrong!