Try our new documentation site (beta).
Setting up Gurobi for MATLAB
To begin, you'll need to tell MATLAB where to find the Gurobi
routines. We've provided a script to assist you with this. The
Gurobi MATLAB setup script, gurobi_setup.m
, can be found in
the <installdir>/matlab
directory of your Gurobi installation
(e.g., /opt/gurobi560/linux64/matlab
for the 64-bit Linux
version of Gurobi 5.6). To get started, type the following commands
within MATLAB to change to the matlab
directory and call
gurobi_setup
:
>> cd /opt/gurobi560/linux64/matlab >> gurobi_setup
You will need to be careful that the MATLAB binary and the Gurobi package you install both use the same instruction set. For example, if you are using the 64-bit version of MATLAB, you'll need to install the 64-bit version of Gurobi, and you'll need to use the 64-bit Gurobi MATLAB libraries (i.e., the ones included with the 64-bit version of Gurobi). This is particularly important on Windows systems, where the error messages that result from instruction set mismatches can be quite cryptic.