gprop EMTTOOL lmatch

EMTTOOL >> EMTTOOL > grad

grad

gradient of a scalar field at a point

Calling Sequence

g=grad(xyz)

Parameters

xyz

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

g

gradient vector at xyz

Description

grad(xyz) computes the gradient vector of a scalar field at the point given by xyz. the scalar field needs to be specified explicitly or use emtgrad function.

Examples

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

g=grad([1 2 3]);

See Also

Author

gprop EMTTOOL lmatch