# fminsimplex.m

Finds a local minimum of a function of several variables without the use of gradient calculations, based on N. J. Higham. The Matrix Computation Toolbox. http://www.ma.man.ac.uk/~higham/mctoolbox from N. J. Higham, University of Manchester (v1.2 Sept 2002).

## Syntax

    [x,f_min,data] = fminsimplex(cost_function,x,optim,cost_fun_vars)


## Description

This simplex optimisation is a minimisation algorithm. Two methods are available, Nelder-Mead and Multi-directional search algorithm. Convergence is not guaranteed. The Multi-directional search can use a parallel cost function (see optim_tols.m).

## Arguments

    cost_function     - Function handle, e.g. @cost_function,

x                 - Initial guess for the waveform.

optim             - Structure providing the options for the numerical optimisation algorithm.
See optim_tols.m for all options.

cost_fun_vars     - (optional) an set of variable to pass to the cost function.
These can be modified within the cost function.


## Returns

    x                 - Output waveform at the end of the optimisation.
Should be the waveform at a local minimum cost.

f_min             - Output cost at the end of the optimisation at x.

data              - data structure containing diagnostics of the optimisation algorithm.


## Notes

This function is coded for maximisation. The Nelder-Mead algorithm works well if followed by a Multi-directional search then another Nelder-Mead optimisation. The Multi-directional search algorithm is very sensitive the the initial simplex shape. The Multi-directional search algorithm can become a highly parallel function.

MULTI-DIRECTIONAL:

[1] V. J. Torczon, multi-directional search: A direct search algorithm for parallel machines, Ph.D. Thesis, Rice University, Houston, Texas, 1989.

[2] V. J. Torczon, On the convergence of the multidirectional search algorithm, SIAM J. Optimization, 1 (1991), pp. 123-145.

[3] N. J. Higham, Optimization by direct search in matrix computations, SIAM J. Matrix Anal. Appl, 14(2): 317-333, 1993.

[4] N. J. Higham, Accuracy and Stability of Numerical Algorithms, Second edition, Society for Industrial and Applied Mathematics, Philadelphia, PA, 2002; sec. 20.5.