Examples

MINTOOLKIT contains some functions for use by users, and some other functions that users can ignore. The functions for users are


Function Purpose
bfgsmin


This section gives some very simple examples of the use of the algorithms and functions in MINTOOLKIT. The first examples are intended to clearly illustrate how to use the algorithms. Realism is not important. Then some more difficult problems are considered.

The functions in MINTOOLKIT allow minimization or differentiation with respect to any of the arguments of a function, holding the other arguments fixed. The other arguments can include data or fixed parameters of the function, for example. The argument with respect to which minimization or differentiation is done is denoted by $ minarg$, which by default is equal to 1. Any function to be minimized or differentiated by algorithms in MINTOOLKIT must follow one of the forms


$\displaystyle value$ $\displaystyle =$ $\displaystyle \, f(arg_{1},\, arg_{2},\,...,\, arg_{p})$  
$\displaystyle {}[value,\, return_{2},\,...,\, return_{n}]$ $\displaystyle =$ $\displaystyle \, f(arg_{1},\, arg_{2},\,...,\, arg_{p})$  

Special case: If the second form is used and $ return_{2}$ is a $ k\times1$ vector, where $ k$ is the dimension of $ minarg$, then is assumed to be the gradient of $ f$ with respect to $ minarg$, if the algorithm called uses the gradient. Otherwise, it (and any other returns from $ f$) are ignored by MINTOOLKIT.



Subsections
Søren Hauberg 2008-04-29