Returns a vector containing thesubscripts of the array elements contained inside a specified polygon.
y A vector containing the y subscripts of the vertices that define the polygon.
sx The number of columns in the array surrounding the polygon.
sy The number of rows in the array surrounding the polygon.
run_length (optional) If present and nonzero, returns a vector of run lengths, rather than subscripts. Each element with an even subscript result contains the length of the run, and the following element contains the starting index of the run.
For large polygons, using run_length can save considerable space.
The x and y parameters are vectors containing the subscripts of the vertices that define the polygon in the coordinate system of the two-dimensional sx-by-sy array.
The sx and sy parameters define the number of columns and rows in the array enclosing the polygon. At least three points must be specified, and all points should lie within the limits:
data
.
x = [100, 200, 300] y = [100, 300, 100]
p = data(POLYFILLV(x, y, 512, 512))
std = STDEV(p, mean)