This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Quadratic Programming

Solve problems with quadratic objectives and linear constraints

See First Choose Problem-Based or Solver-Based Approach for choosing between problem-based optimization and solver-based optimization.

For the problem-based approach, create problem variables, and then represent the objective function and constraints in terms of these symbolic variables. For the problem-based steps to take, see Problem-Based Workflow. To solve the resulting problem, use solve.

For the solver-based steps to take, including defining the objective function and constraints, and choosing the appropriate solver, see Solver-Based Optimization Problem Setup. To solve the resulting problem, use quadprog.


expand all

evaluateEvaluate optimization expression
infeasibilityConstraint violation at a point
solveSolve optimization problem
quadprogQuadratic programming


Problem-Based Quadratic Programming Applications

Quadratic Programming with Bound Constraints: Problem-Based

Shows how to solve a problem-based quadratic programming problem with bound constraints using different algorithms.

Large Sparse Quadratic Program, Problem-Based

Shows how to solve a large sparse quadratic program using the problem-based approach.

Bound-Constrained Quadratic Programming, Problem-Based

Example showing large-scale problem-based quadratic programming.

Quadratic Programming for Portfolio Optimization, Problem-Based

Example showing problem-based quadratic programming on a basic portfolio model.

Solver-Based Quadratic Programming Applications

Quadratic Minimization with Bound Constraints

Example of quadratic programming with bound constraints.

Quadratic Minimization with Dense, Structured Hessian

Example showing how to save memory in a structured quadratic program.

Large Sparse Quadratic Program with Interior Point Algorithm

Example showing how to save memory in a quadratic program by using a sparse quadratic matrix.

Bound-Constrained Quadratic Programming, Solver-Based

Example showing solver-based large-scale quadratic programming.

Quadratic Programming for Portfolio Optimization Problems, Solver-Based

Example showing solver-based quadratic programming on a basic portfolio model.

Problem-Based Algorithms

Problem-Based Optimization Algorithms

How the optimization functions and objects solve optimization problems.

Supported Operations on Optimization Variables and Expressions

Lists all available mathematical and indexing operations on optimization variables and expressions.

Algorithms and Options

Quadratic Programming Algorithms

Minimizing a quadratic objective function in n dimensions with only linear and bound constraints.

Optimization Options Reference

Describes optimization options.