" E) u. |& Y+ b0 }9 g# `看了fill函数该调用命令形式的帮助文档,但对下例中的涂色问题仍不理解,请教大神,非常感谢! 6 I+ s$ A' u. s `/ o$ Mfill(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! T: W. \2 Z8 l' v+ Z( D
' O3 j7 D( P: `9 k% O J8 b1 R& g# A3 L% t
实例:8 t& \6 V0 L# J* H9 L. |. s
clc; 9 I/ F& Y+ `5 H3 A. \6 S/ Pclear all; / U# ~) Q& ~7 j7 y( W8 W; C& d2 O" z) [x=[0 1 1 0]; C" D. h. P' O! a. x6 y9 U
y=[0 0 1 1]; %定义四个点 [0 0] [1 0] [1 1] [0 1] ! ~6 w$ J& T- X- {7 LH_F=fill(x,y,[0 0.1 0.2 0.6]); %定义四个点的C值# d* F6 A; d; k9 `1 Y8 v/ `
, c$ [+ J+ x1 M/ b$ u z
这里定义颜色没有用'r'等字符定义,好像也不是直接定义RGB Value。似乎是一个顶点用一个数值定义了颜色,想知道涂色规律是什么。作者: ExxNEN 时间: 2020-3-6 18:08
帮你顶一下