GRADIENT

Purpose:

Calculates the 2D derivative of an array.

Syntax:

GRADIENT(a)

a

-

An array.

Returns:

An array.

Example:

(x, y) = fxyvals(-2, 2, .1, -2, 2, .1);

z = cos(x*y);

g = gradient(z);

 

calculates the surface derivative of cos(x*y).

 

W1: plot3d(g)

W2: plot3d(z);shadewith(W1);

 

shades the original surface with its gradient.

Remarks:

If the input is a series, the derivative is returned.

See Also:

DERIV

IGRID