Genetic Algorithm and Direct Search Toolbox Previous page   Next Page

Performing a Pattern Search from the Command Line

As an alternative to using the Pattern Search Tool, you can call the function patternsearch at the command line. This section explains how to do so and covers the following topics:

Performing a Pattern Search with the Default Options

This section describes how to perform a pattern search with the default options.

Pattern Search on Unconstrained Problems

For an unconstrained problem, call patternsearch with the syntax

The output arguments are

The required input arguments are

As an example, you can run the example described in Example: Finding the Minimum of a Function from the command line by entering

This returns

Pattern Search on Constrained Problems

If your problem has constraints, use the syntax

where

You only need to pass in the constraints that are part of the problem. For example, if there are no bound constraints, use the syntax

Use empty brackets [] for constraint arguments that are not needed for the problem. For example, if there are no inequality constraints, use the syntax

Additional Output Arguments

To get more information about the performance of the pattern search, you can call patternsearch with the syntax

Besides x and fval, this returns the following additional output arguments:

See the reference page for patternsearch for more information about these arguments.


Previous page  Generate M-File Setting Options Next page

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS