CVX: Matlab Software for Disciplined Convex Programming

Version 1.21 (August 2010, Build 800)
by Michael Grant and Stephen Boyd

Downloads

The CVX package includes the program files, the users’ guide, and the complete example library. To download it, use one of these links.

To download the user guide alone, select this link:

Installation instructions

For most platforms, installation is relatively simple:

  1. If you already have an earlier version of CVX installed, remove it or move it out of the way. Do not install this version on top of the old.

  2. Unpack the .zip or .tar.gz file wherever you like; however, do not install it into Matlab’s own toolbox directory. It will create a directory called cvx.

  3. Start Matlab.

  4. At the Matlab prompt, type cd <cvxroot>, where <cvxroot> is the cvx/ directory that was created when the software was unpacked.

  5. Important: Run the command cvx_setup to configure the software.

  6. When cvx_setup completes, it may ask you to save the current path so that cvx will automatically be available when you start Matlab. If you do not do so, you will have to re-run cvx_setup every time you start Matlab.

For more detailed installation instructions, see Appendix A of the user’s guide.

Attention 64-bit Windows users: you may need to install some additional Microsoft libraries to get the CVX, SeDuMi, and SDPT3 mex files to work. If you get setup errors during the cvx_setup process, go to the appropriate page below and click the “Download” button. Or you can download them proactively; there is no harm in doing so.

System requirements

CVX is built using Matlab, and requires version 6.5 or later of Matlab to run. It is built using both native Matlab code and C MEX files. It currently supports two solvers, SDPT3 and SeDuMi, both of which are also built using a combination of Matlab and C MEX files. Precompiled binaries for Mac (Intel), Windows, and Linux are supplied with the distribution, but it should work fine with any platform that supports Matlab 6.5 or later and at least one of the solvers. See Appendix A of the user’s guide for more detials.

Note for 64-bit MATLAB users: CVX is supported only for 64-bit Matlab versions 7.3 and later. This is due to changes made in Matlab’s internal data structures for 64-bit platforms. We simply cannot reliably support the “old” 64-bit API and the “new” 64-bit API in the same package.

Note for users of MATLAB 7.0: Versions 7.0.x of MATLAB (R14, R14SP1, R14SP2) reject certain CVX models, issuing syntax errors that are simply not correct. Numerical problems with version 7.0.0 and SDPT3 have also been reported. See section A.4 of the user’s guide for more details; but in short we recommend that versions 7.0.x be avoided, at least when using CVX.

SVN Repository

Read-only access to the Subversion repository for CVX is provided here. Feel free to browse it: thanks to the Repos Style package, it is nicely formatted, and you can even view recent change histories for any file or directory. The CVX distribution is currently being pulled from the trunk subdirectory.

Commit privileges are not available at this time. If you would like to submit changes, please contact me directly.

(If you don’t understand any of this, it is very likely you needn’t worry about it.)