MATLAB API Overview#
This section documents the Gurobi MATLAB interface. For those of you who are not familiar with MATLAB, it is an environment for doing numerical computing. Please visit the MATLAB web site for more information. This manual begins with a quick overview of the methods provided by our MATLAB API. It then continues with a comprehensive presentation of all of the available methods, their arguments, and their return values.
If you are new to the Gurobi Optimizer, we suggest that you start with the Getting Started Knowledge Base article for general information. This also includes Tutorials for the different Gurobi APIs. Additionally, our Example Tour provides concrete examples of how to use the methods described here. We will point to sections or examples of this tour whenever it fits in this overview.
The MATLAB Optimization Toolbox provides its own interface for building
optimization models (starting with version 2017b). Gurobi supports this
interface as well. We’ll discuss this aspect in the problem-based modeling section; consult also the linprog
, intlinprog
,
opttoolbox_lp
, and opttoolbox_mip1
examples in the Gurobi distribution
for illustrations of how to pass models built using this interface to Gurobi.
A quick note for new users: the convention in math programming is that variables are non-negative unless specified otherwise. You’ll need to explicitly set lower bounds if you want variables to be able to take negative values.
Contents