|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
8 |+ Z! r5 Y6 N: ^6 m- L5 o看了fill函数该调用命令形式的帮助文档,但对下例中的涂色问题仍不理解,请教大神,非常感谢!8 e; q( ], T7 V$ q2 L& Y8 y0 m1 c+ ~
fill(X,Y,C) creates filled polygons from the data in X and Y with vertex color specified by C. C is a vector or matrix used as an index into the colormap. If C is a row vector, length(C) must equal size(X,2) and size(Y,2); if C is a column vector, length(C) must equal size(X,1) and size(Y,1). If necessary, fill closes the polygon by connecting the last vertex to the first/ I, T6 ^* Q4 R* i
$ o# p) e2 @! z ]1 ^( {& |8 a. j+ j) z: s |
实例:
7 e3 h: V# n' b: L5 I7 sclc;
: A/ K( F5 [# f: ^clear all;
/ }: Y0 ]: {' i* A( Vx=[0 1 1 0];! I5 ]' P* O" K: E# q5 [
y=[0 0 1 1]; %定义四个点 [0 0] [1 0] [1 1] [0 1]& | M" ]6 e9 ^( L) x2 W. A
H_F=fill(x,y,[0 0.1 0.2 0.6]); %定义四个点的C值* X5 D3 k) V# N
2 K8 ~% T1 Z" @1 y这里定义颜色没有用'r'等字符定义,好像也不是直接定义RGB Value。似乎是一个顶点用一个数值定义了颜色,想知道涂色规律是什么。 |
|