dipole EMTTOOL dmax

EMTTOOL >> EMTTOOL > div

div

divergence of a vector field at a point

Calling Sequence

g=div(xyz)

Parameters

xyz

vector of rectangular coordinates of evaluation point, xyz=[x y z]

g

divergence value at xyz

Description

curl(xyz) computes the divergence value of a vector field at the point given by xyz. the vector field needs to be specified explicitly or use emtdiv function.

Examples

function f=fx(x)
  f=x(1)*x(2).^2+x(2).^2.*x(3);
endfunction

function f=fy(x)
  f=x(2)*x(3).^2+x(3).^2.*x(1);
endfunction

function f=fz(x)
  f=x(3)*x(1).^2+x(1).^2.*x(2);
endfunction

g=div([1 2 3]);

See Also

Author

dipole EMTTOOL dmax