CVX: Matlab Software for Disciplined Convex Programming

IMPORTANT NOTE ABOUT MATLAB R2017a or later: a number of users are reporting issues with CVX and R2017a; and indeed, we’re seeing them too. At the moment, we must assume that MATLAB R2017a is *not* compatible with CVX. If you need to use CVX, you will need to stick with R2016b or earlier. We do not have a timeline for a fix yet.

If you’re feeling particularly adventurous, and you’re not i n the middle of important work, you might want to try thebeta version.You can always switch back if it causes you problems.

Important note: CVX is not compatible with Octave. Please do not try to install it—you will waste your time! But read this post for some good news.

Download matrix

OS32/64mexextDownload linksSDPT3SeDuMiGurobiMOSEK
Standard bundles, including Gurobi and/or MOSEK
Linux64-bitmexa64cvx-a64.zipcvx-a64.tar.gz
Mac64-bitmexmaci64cvx-maci64.zipcvx-maci64.tar.gz
Windows32-bitmexw32cvx-w32.zipcvx-w32.tar.gz
64-bitmexw64cvx-w64.zipcvx-w64.tar.gz
Redistributable: free solvers only
All platformscvx-rd.zipcvx-rd.tar.gz
All platforms (v1.22)cvx-1.22.zipcvx-1.22.tar.gz
Commercial solvers only
Linux64-bitmexa64cvx-a64-co.zipcvx-a64-co.tar.gz
Mac64-bitmexmaci64cvx-maci64-co.zipcvx-maci64-co.tar.gz
Windows32-bitmexw32cvx-w32-co.zipcvx-w32-co.tar.gz
64-bitmexw64cvx-w64-co.zipcvx-w64-co.tar.gz

Which package should I download?

For most users, a Standard bundle will be the right choice. These include all of the supported solvers available for your platform.

The Redistributable bundle is appropriate if you do not intend to use a commercial solver, or if you wish to distribute CVX with your application, under the CVX Standard License (v2.0) or the GPLv2 (v1.22).

The Commercial bundles are appropriate for organizations that are sensitive to the use of GPL-licensed software. These bundles do not include the solvers SDPT3 or SeDuMi, which are subject to the GPLv2 license and are included with CVX with permission.

Still using 32-bit Linux? It’s time for an upgrade! The Mathworks and both commercial solver vendors have dropped support for 32-bit Linux, so we must as well. Nevertheless, we still include binaries for 32-bit Linux in the Redistributable bundles.

Please note that the use of Gurobi and MOSEK require a CVX Professional license key. In addition, Gurobi requires a separate license key obtained directly from Gurobi Optimization. Without these licenses, the Full package still provides full functionality with the free solvers SeDuMi and SDPT3, so there is no harm in downloading the Full package even if you do not intend to use the commercial solvers.

Installation instructions

For most platforms, installation is relatively simple: unpack the distribution to an empty directory, and then run cvx_setup from the MATLAB command line. Do not add CVX to your path yourself; let cvx_setup do it for you. Full instructions can be found in the Installation section of the users’ guide, found here online or included with the distribution in the doc/ subdirectory.

We have created two separate sections in the users’ guide for using CVX with Gurobi and MOSEK. These sections include special instructions for connecting external installations of Gurobi and MOSEK to CVX, and instructions on licenses.

Licensing and redistribution

CVX is free for use in both academic or commercial applications when paired with one of the free bundled free solvers, SDPT3 or SeDuMi. A CVX Professional license is required to use CVX with the commercial solvers Gurobi and MOSEK. Academic users can obtain a license key at no charge. For more information, visit the Licensing page. The use of Gurobi also requires a license key from Gurobi as well; again, academic users can obtain such a key free of charge.

Each of the packages above come with different licensing conditions; please see the license page of the documentation

for more details. A brief summary:

    • The Full and BYOS packages may not be redistributed without the advance written permission of CVX Research, Inc.
    • The Redistributable packages for version 2.x are subject to the terms of the CVX Standard License, which is a minor

      modification of the GNU General Public License, Version 3.

    • Version 1.22 is distributed under a pure GNU Standard License, Version 2.