|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
/ [1 q9 ], U# n看了fill函数该调用命令形式的帮助文档,但对下例中的涂色问题仍不理解,请教大神,非常感谢!! h! a4 e4 E8 h/ x
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
6 ]2 P- [$ M; o$ b2 R0 U( _7 J4 n' W7 `8 {' n% I
5 e' V. ^! q7 O) G2 j1 c7 W! U8 |9 ~
实例:
. B* W6 G+ z3 [& H' nclc;3 f7 x- ~! }+ U' P9 |
clear all;
0 m1 T+ w6 @& s" i6 [$ Ex=[0 1 1 0];
; d$ B8 ~1 L) f0 @y=[0 0 1 1]; %定义四个点 [0 0] [1 0] [1 1] [0 1]# l. Z* Z3 [" f0 l2 J" V
H_F=fill(x,y,[0 0.1 0.2 0.6]); %定义四个点的C值, \2 {+ `6 ^* a6 q
: P* B; y0 x- X6 z4 d; t2 |$ B这里定义颜色没有用'r'等字符定义,好像也不是直接定义RGB Value。似乎是一个顶点用一个数值定义了颜色,想知道涂色规律是什么。 |
|