MATLAB cvx 工具包使用

一个例子

m = 20; n = 10; p = 4;
A = randn(m,n); b = randn(m,1);
C = randn(p,n); d = randn(p,1); e = rand;
cvx_begin quiet      %开始
    variable x(n)
    minimize( norm( A * x - b, 2 ) )
    subject to       %加入约束条件
        C * x == d
        norm( x, Inf ) <= e
cvx_end                %结束
x                          %输出结果                

 

原文地址:https://www.cnblogs.com/yujiamin/p/5906218.html