Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: nummath
See also: nmBFGS

Quantlet: nmmin
Description: Nelder-Mead simplex method to find minimum of a given function.

Usage: {xmin,fmin,iter} = nmmin(func,x0{,maxiter, ftol, vtol})
Input:
func string, name of the function to minimize
x0 n x 1 vector, initial estimate of minimum
maxiter (optional) scalar, maximal number of iterations default is maxiter = 500
ftol (optional) scalar, convergence tolerance of the function value default is ftol = 1e-7
vtol (optional) scalar, convergence tolerance of the value of the arguments; default is vtol = 1e-7
Output:
xmin n x 1 vector, minimum of the function
fmin scalar, minimal function value
iter scalar, number of performed iterations

Example:
proc(p)=ftion(x)
  p= log(4+abs(x[1,]+2)+abs(x[2,]-3))
endp
library("nummath")
nmmin("ftion",#(1,2))

Result:
Contents of _tmp.xmin
[1,]       -2
[2,]        3
Contents of _tmp.fmin
[1,]   1.3863
Contents of _tmp.iter
[1,]       63



Author: S. Borak, R. Weron 20030225 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006