Products & Services Solutions Academia Support User Community Company

Learn more about Optimization Toolbox   

Choosing a Solver

Optimization Decision Table

The following table is designed to help you choose a solver. It does not address multiobjective optimization or equation solving. There are more details on all the solvers in Problems Handled by Optimization Toolbox Functions.

Use the table as follows:

  1. Identify your objective function as one of five types:

    • Linear

    • Quadratic

    • Sum-of-squares (Least squares)

    • Smooth nonlinear

    • Nonsmooth

  2. Identify your constraints as one of five types:

    • None (unconstrained)

    • Bound

    • Linear (including bound)

    • General smooth

    • Discrete (integer)

  3. Use the table to identify a relevant solver.

In this table:

Solvers by Objective and Constraint

Constraint Type Objective Type
LinearQuadraticLeast SquaresSmooth nonlinearNonsmooth
Nonen/a (f = const, or min = )quadprog, Theory, Examples\, lsqcurvefit, lsqnonlin, Theory, Examplesfminsearch, fminunc, Theory, Examplesfminsearch, *
Boundlinprog, Theory, Examplesquadprog, Theory, Exampleslsqcurvefit, lsqlin, lsqnonlin, lsqnonneg, Theory, Examplesfminbnd, fmincon, fseminf, Theory, Examples*
Linearlinprog, Theory, Examplesquadprog, Theory, Exampleslsqlin, Theory, Examplesfmincon, fseminf, Theory, Examples*
General smoothfmincon, Theory, Examplesfmincon, Theory, Examplesfmincon, Theory, Examplesfmincon, fseminf, Theory, Examples*
Discretebintprog, Theory, Example

Problems Handled by Optimization Toolbox Functions

The following tables show the functions available for minimization, equation solving, multiobjective optimization, and solving least-squares or data-fitting problems.

Minimization Problems

TypeFormulationSolver

Scalar minimization

such that l < x < u (x is scalar)

fminbnd

Unconstrained minimization

fminunc,
fminsearch

Linear programming

such that A·x ≤ b, Aeq·x = beq, l ≤ x ≤ u

linprog

Quadratic programming

such that A·x ≤ b, Aeq·x = beq, l ≤ x ≤ u

quadprog

Constrained minimization

such that c(x) ≤ 0, ceq(x) = 0, A·x ≤ b, Aeq·x = beq, l ≤ x ≤ u

fmincon

Semi-infinite minimization

such that K(x,w) ≤ 0 for all w, c(x) ≤ 0, ceq(x) = 0, A·x ≤ b, Aeq·x = beq, l ≤ x ≤ u

fseminf

Binary integer programming

such that A·x ≤ b, Aeq·x = beq, x binary

bintprog

Multiobjective Problems

TypeFormulationSolver

Goal attainment

such that F(x) – w·γ ≤ goal, c(x) ≤ 0, ceq(x) = 0, A·x ≤ b, Aeq·x = beq, l ≤ x ≤ u

fgoalattain

Minimax

such that c(x) ≤ 0, ceq(x) = 0, A·x ≤ b, Aeq·x = beq, l ≤ x ≤ u

fminimax

Equation Solving Problems

TypeFormulationSolver

Linear equations

C·x = d, n equations, n variables

\ (matrix left division)

Nonlinear equation of one variable

f(x) = 0

fzero

Nonlinear equations

F(x) = 0, n equations, n variables

fsolve

Least-Squares (Model-Fitting) Problems

TypeFormulationSolver

Linear least-squares

m equations, n variables

\ (matrix left division)

Nonnegative linear-least-squares

such that x ≥ 0

lsqnonneg

Constrained linear-least-squares

such that A·x ≤ b, Aeq·x = beq, lb ≤ x ≤ ub

lsqlin

Nonlinear least-squares

such that lb ≤ x ≤ ub

lsqnonlin

Nonlinear curve fitting

such that lb ≤ x ≤ ub


lsqcurvefit

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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