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.

fill3If you specify color using C, fill3 scales the elements of C by the axes propertyCLim, which specifies the color axis scaling parameters, before indexing thecurrent colormap.If C is a row vector, fill3 generates flat-shaded polygons and sets theFaceColor property of the patch objects to 'flat'. Each element becomes theCData property value for the respective patch object.If C is a column vector or a matrix, fill3 generates polygons with interpolatedcolors and sets the patch object FaceColor property to 'interp'. fill3 uses alinear interpolation of the vertex colormap indices when generating polygonswith interpolated colors. The elements in one column become the CDataproperty value for the respective patch object. If C is a column vector, fill3replicates the column vector to produce the required sized matrix.ExamplesCreate four triangles with interpolated colors.X = [0 1 1 2;1 1 2 2;0 0 1 1];Y = [1 1 1 1;1 0 1 0;0 0 0 0];Z = [1 1 1 1;1 0 1 0;0 0 0 0];C = [0.5000 1.0000 1.0000 0.5000;1.0000 0.5000 0.5000 0.1667;0.3330 0.3330 0.5000 0.5000];fill3(X,Y,Z,C)2-195

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

Saved successfully!

Ooh no, something went wrong!