# patternsearch

Find minimum of function using pattern search

## Syntax

## Description

finds
a local minimum, `x`

= patternsearch(`fun`

,`x0`

)`x`

, to the function handle `fun`

that
computes the values of the objective function. `x0`

is
a real vector specifying an initial point for the pattern search algorithm.

**Note**

Passing Extra Parameters explains how to pass extra parameters to the objective function and nonlinear constraint functions, if necessary.

defines
a set of lower and upper bounds on the design variables in `x`

= patternsearch(`fun`

,`x0`

,`A`

,`b`

,`Aeq`

,`beq`

,`lb`

,`ub`

)`x`

,
so that the solution is always in the range `lb `

≤` x `

≤` ub`

.
If no linear equalities exist, set `Aeq = []`

and ```
beq
= []
```

. If `x(i)`

has no lower bound, set ```
lb(i)
= -Inf
```

. If `x(i)`

has no upper bound, set ```
ub(i)
= Inf
```

.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

By default, `patternsearch`

looks for a minimum
based on an adaptive mesh that, in the absence of linear constraints,
is aligned with the coordinate directions. See What Is Direct Search? and How Pattern Search Polling Works.

## Alternative Functionality

### App

The **Optimize** Live Editor task provides a visual interface for `patternsearch`

.

## References

[1] Audet, Charles, and J. E. Dennis Jr. “Analysis
of Generalized Pattern Searches.” *SIAM Journal on
Optimization*. Volume 13, Number 3, 2003, pp. 889–903.

[2] Conn, A. R., N. I. M. Gould, and Ph. L.
Toint. “A Globally Convergent Augmented Lagrangian Barrier
Algorithm for Optimization with General Inequality Constraints and
Simple Bounds.” *Mathematics of Computation*.
Volume 66, Number 217, 1997, pp. 261–288.

[3] Abramson, Mark A. *Pattern Search Filter Algorithms
for Mixed Variable General Constrained Optimization Problems*.
Ph.D. Thesis, Department of Computational and Applied Mathematics,
Rice University, August 2002.

[4] Abramson, Mark A., Charles Audet, J. E. Dennis, Jr.,
and Sebastien Le Digabel. “ORTHOMADS: A deterministic MADS
instance with orthogonal directions.” *SIAM Journal
on Optimization*. Volume 20, Number 2, 2009, pp. 948–966.

[5] Kolda, Tamara G., Robert Michael Lewis, and Virginia
Torczon. “Optimization by direct search: new perspectives on
some classical and modern methods.” *SIAM Review*.
Volume 45, Issue 3, 2003, pp. 385–482.

[6] Kolda, Tamara G., Robert Michael Lewis, and Virginia Torczon. “A generating set direct search augmented Lagrangian algorithm for optimization with a combination of general and linear constraints.” Technical Report SAND2006-5315, Sandia National Laboratories, August 2006.

[7] Lewis, Robert Michael, Anne Shepherd, and Virginia Torczon.
“Implementing generating set search methods for linearly constrained
minimization.” *SIAM Journal on Scientific Computing*.
Volume 29, Issue 6, 2007, pp. 2507–2530.

## Extended Capabilities

## See Also

`ga`

| `optimoptions`

| `paretosearch`

| Optimize

### Topics

- Optimize Using the GPS Algorithm
- Coding and Minimizing an Objective Function Using Pattern Search
- Constrained Minimization Using Pattern Search, Solver-Based
- Effects of Pattern Search Options
- Optimize an ODE in Parallel
- Pattern Search Climbs Mount Washington
- Optimization Workflow
- What Is Direct Search?
- Pattern Search Terminology
- How Pattern Search Polling Works
- Polling Types
- Search and Poll

**Introduced before R2006a**