Posted on
2016-09-25 16:34sucre_2
阅读(2259)
评论(0)
编辑收藏举报
一个例子
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 %输出结果