Spline Toolbox    
fndir

Directional derivative of a function

Syntax

Description

Let f  be the function described by f, let y be the sole column of the matrix direction, and assume that y has as many entries as the function has arguments. Then df is the ppform of the directional derivative of f  in the direction y, i.e., of the function

.

If the matrix direction has n columns and f  is m-valued, then the function in df is (mn)-valued. Its value at x, reshaped as a matrix of size (m,n), has in its jth column the directional derivative of f at x in the direction of the jth column of direction.

Examples

For example, if f describes a d-variate m-vector-valued function and x is some point in its domain, then

is the Jacobian of that function at that point.

As a related example, the next statements plot the gradients of (a good approximation to) the Franke function at a regular mesh:

Algorithm

The function in f is converted to ppform, and the directional derivative of its polynomial pieces is computed formally and in one vector operation, and put together again to form the ppform of the directional derivative of the function in f.

See Also

fnder, fnint


 fnder fnint