# cordexch

Coordinate-exchange D-optimal design

## Syntax

## Description

returns a numeric matrix `dCE`

= cordexch(`nfactors`

,`nruns`

)`dCE`

containing a D-optimal design with
`nruns`

runs for `nfactors`

factors. The design is
for a linear additive model with a constant term. By default, each factor has two levels.
Each row (run) of `dCE`

contains the settings for each factor in the
design, which `cordexch`

generates using a coordinate-exchange
algorithm (see Algorithms).

specifies options using one or more name-value arguments in addition to any of the input
argument combinations in the previous syntaxes. For example, you can specify the lower and
upper bounds for each factor, and the indices of categorical factors.`dCE`

= cordexch(___,`Name=Value`

)

## Examples

## Input Arguments

## Output Arguments

## Algorithms

Both `cordexch`

and `rowexch`

use iterative search algorithms that incrementally change an initial
design matrix *X* to increase *D* =
|*X*^{T}*X*|
at each iteration. In both algorithms, randomness is built into the selection of the initial
design and the choice of the incremental changes. As a result, both algorithms might return
locally *D*-optimal designs instead of globally *D*-optimal
designs. Run each algorithm multiple times and select the best result for your final design.
To automate this repetition and comparison, set the `NumTries`

name-value
argument of either function.

Unlike the row-exchange algorithm used by `rowexch`

, the
coordinate-exchange algorithm used by `cordexch`

does not use a candidate
set. Instead, the candidate set is the entire design space. At each step, the
coordinate-exchange algorithm exchanges a single element of *X* with a new
element evaluated at a neighboring point in the design space. The absence of a candidate set
reduces demands on memory, but the smaller scale of the search makes the coordinate-exchange
algorithm more likely to become trapped in a local minimum.

## Extended Capabilities

## Version History

**Introduced before R2006a**