CVX Installation Instructions
CVX is Matlab-based modelling language, primarily for constructing and solving convex optimization problems. (See http://cvxr.com/cvx/ for more details.) Although installing CVX is fairly straightforward, this page summarizes the key steps. If you come across any problems or issues, please see "Questions, Comments and Common Problems" below.
Installing Matlab
If you already have MATLAB installed, you may skip this step.
Matlab is available for free for current students at MIT from IS&T. Please follow the installation instructions from IS&T that can be found here . If you've never used MATLAB before, there are some beginner tutorials and other info .
Installing CVX
After installing Matlab and testing your installation, you are ready to install CVX. Follow the instructions available from CVX Research. Some notes:
- Mac users should use the "UNIX" files .tar.gz files.
- You only need to follow the sections labeled "Supported Platforms" and "Installation Instructions." The sections "Installing a CVX Professional License" and "Using CVX with Gurobi or MOSEK" are optional and not required for Software Tools Class . (See below for more details.)
- The instructions may suggest creating a "startup.m" file if you're on a UNIX system. (If you're on Windows, this may not happen.) This is a configuration file for MATLAB so that it will always know where to look for CVX functions. We also recommend adding one.
- Look in your "MATLAB" folder. It might be in a location like: "/Users/<your username>/Documents/MATLAB"
- If you already have a startup.m file, great! If not, create a blank document named startup.m in this location.
- Add the following code to your startup.m file
addpath <path to cvx folder>
addpath <path to cvx folder>/structures
addpath <path to cvx folder>/lib
addpath <path to cvx folder>/functions
addpath <path to cvx folder>/commands
addpath <path to cvx folder>/builtins
replacing < path to cvx folder > as appropriate.
Connecting CVX to Gurobi (Optional)
Connecting CVX to Gurobi is optional and will not be needed for our session. It is pretty easy to do, though, and if you plan on solving Integer Programs through Matlab, you SHOULD do it.
For now, consult the website for details. When I have time, I will add details here.
Testing your installation instructions
Don't forget to Test your installation
Questions, Comments and Common Problems
If you come across an error in these installation instructions, please
- Email the session leader
- If you are certain about the correction, please edit this Wiki document appropriately. Remember to include all pertinent details including any OS or version info.
- If you are not certain about the correction, start a comment thread on this page to discuss.