一个例子 m = ; n = ; p = ; A = randn(m,n); b = randn(m,); C = randn(p,n); d = randn(p,); e = rand; cvx_begin quiet %开始 variable x(n) minimize( norm( A * x - b, ) ) subject to %加入约束条件 C * x == d norm( x, Inf ) <= e cvx_end %结束 x %输出结果
CVX下载 下载地址 使用手册 Using Gurobi with CVX Using MOSEK with CVX CVX安装 下载压缩文件后解压缩至任意地址,打开matlab,进入解压缩后的地址,在matlab中输入 cvx_setup,如果出现以下信息,则说明安装成功. Testing the cvx distribution. If this script aborts with an error, please report the error to the authors. ----
Download the zip file of cvx http://cvxr.com/cvx/download/ by downloading cvx-w64.zip Require a licence for academic use a file named cvx_license.dat Install with licence unzip the zip file into the toolbox directory ($MatlabRoot\toolbox) run the com