Mathematics |

**Minimizing Functions of Several Variables**

The `fminsearch`

function is similar to `fminbnd`

except that it handles functions of many variables, and you specify a starting vector *x*_{0 }rather than a starting interval. `fminsearch`

attempts to return a vector *x* that is a local minimizer of the mathematical function near this starting vector.

To try `fminsearch`

, create a function `three_var`

of three variables, `x`

, `y`

, and `z`

.

Now find a minimum for this function using `x = -0.6`

, `y = -1.2`

, and `z = 0.135`

as the starting values.

Minimizing Functions of One Variable | Fitting a Curve to Data |

© 1994-2005 The MathWorks, Inc.