Volume function
Syntax: |
a = VOLUME(x,y,z)
|
The VOLUME
function calculates the
volume under the scattered points given by vectors x
,
y
and z
= f(x
,y
).
The function returns the volume as a scalar. The region given by
x
and y
is
first triangulated, using a Thiessen triangulation, then the integral is approximated by
integrating the piecewise linear interpolants of the data values. The lengths of the three
vectors must be equal.
If z
is a matrix, the grid region is triangulated.
The volume is approximated by summing the averages of the matrix values at the triangle
vertices multiplied by the area of each triangle. The length of
x
must be equal to the number of columns of the matrix z
, and the length of
y
must be equal to the number of rows of z
.