Open e04cb_demo.m in the Editor
Run demo

E04 Chapter: Nelder–Mead simplex method

The (Nelder–Mead) simplex method is a powerful technique for minimizing a continuous function of n variables (the objective function). The algorithm performs the minimization by, at each iteration, extrapolating the behavior of the objective function measured at test points arranged as a simplex (a polytope of n+1 vertices).

This demo runs the solver on a small test problem in two dimensions so that you can view the solver's progress in a plot. The function, F, used for the demo is defined by:

F = e x (4x2 + 2y2 + 4xy + 2y + 1)

For the plot, the monitor function is artificially slowed down using the value you give for pause_time (defaulting to 0.1).