Scilab Function

numdiff - numerical gradient estimation

Calling Sequence

g=numdiff(fun,x [,dx])

Parameters

Description

given a function fun(x) from R^n to R^p computes the matrix g such as

    [   d f    ]
    [      i   ]
g = [   ----   ]
 ij [   d x    ]
    [      j   ]
   

using finite difference methods.

The function fun calling sequence must be y=fun(x,p1,p2,..pn).If parameters p1,p2,..pn exist then numdiff can be called as follow g=numdiff(list(fun,p1,p2,..pn),x).

Examples

See Also