Chris Beaumont's IDL Library

Download source code

single page | use frames     summary     class     fields     routine details     file attributes

nr/

multimin.pro

topmultimin

Numerical Recipes

result = multimin(func, point [, fmin=fmin] [, tol=tol], _extra=_extra [, verbose=verbose] [, step=step])

This function minimizes a multidimensional function based on Powell's conjugate direction method, described in Numerical Recipes 3rd ed., ch 10.7.1. It repeatedly minimizes the function along a given 1D direction, and tries to choose new directions which don't spoil previous minimizations.

The code is adapted from the pseudocode in ch 10.7.1 of Numerical Recipes 3rd ed. However, the actual code was written independently from the code in that book.

Return value

The location of the minimum

Parameters

func in required

String name of a function to minimize. The function must have a calling sequence like function func, x, _extra = extra. x must be a n-element vector. Extra keywords passed to multimin will be relayed to calls of func.

point in required

A seed point to start the minimization at. An n-element array.

Keywords

fmin in optional

Set to a variable to hold the value of the function at the minimum value.

tol in optional

The fractional accuracy of the minimum location. Default is 1d-4.

_extra
verbose in optional

Produce extra output.

step in optional

The rough scale of the function to minimize. This is the length of the first step taken during each line minimization. Default is 1.

Author information

History:

June 2009: Written by Chris Beaumont. April 2010: Tweaked parameter checking. cnb.

File attributes

Modifcation date: Tue Apr 20 14:56:07 2010
Lines: 126