查看单个帖子
旧 2008-01-24, 12:13   #3
暖阳三杯
初级会员
 
注册日期: 2008-01-24
年龄: 48
帖子: 10
声望力: 18
暖阳三杯 正向着好的方向发展
默认

引用:
作者: dnping 查看帖子
请仔细参阅matlab中的help文档,其中讲得非常详细……^_^
x,y定义的是顶角坐标,c定义的是颜色
PATCH(X,Y,C) adds the "patch" or filled 2-D polygon defined by
vectors X and Y to the current axes. If X and Y are matrices of
the same size, one polygon ("face") per column is added. C
specifies the color of the face(s) ("flat" coloring), or the
vertices ("interpolated" coloring), for which bilinear interpolation
is used to determine the interior color of the polygon.

For both vector or matrix X and Y, if C is a string, each face
is filled with 'color'. 'color' can be 'r','g','b','c','m','y',
'w', or 'k'. If C is a scalar it specifies the color of the
face(s) by indexing into the colormap. A 1x3 vector C is always
assumed to be an RGB triplet specifying a color directly.

For vector X and Y, if C is a vector of the same length, it
specifies the color of each vertex as indices into the
colormap and bilinear interpolation is used to determine the
interior color of the polygon ("interpolated" shading).

When X and Y are matrices, if C is a 1xn, where n is the number
of columns in X and Y, then each face j=1:n is flat colored by the
colormap index C(j). Note the special case of a 1x3 C is always
assumed to be an RGB triplet ColorSpec and specifies the same
flat color for each face. If C is a matrix the same size as X
and Y, then it specifies the colors at the vertices as colormap
indices and bilinear interpolation is used to color the faces.
If C is 1xnx3, where n is the number of columns of X and Y,
then each face j is flat colored by the RGB triplet C(1,j,.
If C is mxnx3, where X and Y are mxn, then each vertex
(X(i,j),Y(i,j)) is colored by the RGB triplet C(i,j, and the
face is colored using interpolation.

这是help中的解释,恕我愚钝,我仍然不能理解c中的数值是什么含义,颜色代号?谢谢版主的热心解答,麻烦你更详细的解释下吧,非常感谢!!
__________________
苦中作乐
暖阳三杯 当前离线   回复时引用此帖