Solving models with the Gurobi MATLAB interface

The Gurobi MATLAB interface can be used to solve optimization problems of the following form:

minimize <span>$</span>x^TQx + c^Tx + \mathrm{alpha}<span>$</span>  
subject to <span>$</span>Ax = b<span>$</span> (linear constraints)
  <span>$</span>\ell \le x \le u<span>$</span> (bound constraints)
  some <span>$</span>x_j<span>$</span> integral (integrality constraints)
  some <span>$</span>x_k<span>$</span> lie within second order cones (cone constraints)
  <span>$</span>x^TQc  x + q^Tx \le \mathrm{beta}<span>$</span> (quadratic constraints)
  some <span>$</span>x_i<span>$</span> in SOS (special ordered set constraints)

Many of the model components listed here are optional. For example, integrality constraints may be omitted. We'll discuss the details of how models are represented shortly.

The function gurobi, described next, allows you to take a model represented using MATLAB matrices and solve it with the Gurobi Optimizer.


Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.