Compute divergence of vector field
div = divergence(X,Y,Z,U,V,W)
div = divergence(U,V,W)
div = divergence(X,Y,U,V)
div = divergence(U,V)
div = divergence(X,Y,Z,U,V,W)
computes
the divergence of a 3-D vector field having vector components U
, V
, W
.
The arrays X
, Y
, and Z
,
which define the coordinates for the vector components U
, V
,
and W
, must be monotonic, but do not need to be
uniformly spaced. X
, Y
, and Z
must
have the same number of elements.
div = divergence(U,V,W)
assumes X
, Y
,
and Z
are determined by the expression
[X Y Z] = meshgrid(1:n,1:m,1:p)
where [m,n,p] = size(U)
.
div = divergence(X,Y,U,V)
computes
the divergence of a 2-D vector field U
, V
.
The arrays X
and Y
, which
define the coordinates for U
and V
,
must be monotonic, but do not need to be uniformly spaced. X
and Y
must
have the same number of elements, as if produced by meshgrid
.
div = divergence(U,V)
assumes X
and Y
are
determined by the expression
[X Y] = meshgrid(1:n,1:m)
where [m,n] = size(U)
.
curl
| isosurface
| streamtube