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
- the default <installdir> for Gurobi 11.0.0 is /opt/gurobi1100/linux64 for Linux
- the default <installdir> for Gurobi 11.0.0 is c:\gurobi1100\win64 for 64-bit Windows
- the default <installdir> for Gurobi 11.0.0 is /Library/gurobi1100/macos_universal2 for Mac
Note: The MATLAB API of Gurobi 11.0.0 is not available for arm64 Linux.
To get started, type the following commands within MATLAB to change to the matlab directory and call gurobi_setup:
>> cd <installdir>/matlab
You will need to be careful that the MATLAB binary and the Gurobi package you install both use the same instruction set. You need to install the 64-bit version of MATLAB to use Gurobi.
This video will guide you through the steps of how to set up Gurobi for Matlab.