CVX: quickstart 5 An optimal trade-off curve

CVX: quickstart 5 An optimal trade-off curve

Minimize |Ax-b|_2+gamma|x|_1
% gamma is 10^{-2} to 10^{2}
gamma = logspace( -2, 2, 20 );
l2norm = zeros(size(gamma)); l1norm = zeros(size(gamma));
for k = 1:length(gamma),
variable x(n);
minimize( norm(A*x-b)+gamma(k)*norm(x,1) );
l1norm(k) = norm(x,1);
l2norm(k) = norm(A*x-b);
plot( l1norm, l2norm );
xlabel( ’norm(x,1)’ );
ylabel( ’norm(A*x-b)’ );
gamma norm(x,1) norm(A*x-b)
1.0000e-002 3.3796e+000 2.0355e+000
1.6238e-002 3.3658e+000 2.0357e+000
2.6367e-002 3.3433e+000 2.0362e+000
4.2813e-002 3.3068e+000 2.0374e+000
6.9519e-002 3.2472e+000 2.0408e+000
1.1288e-001 3.1498e+000 2.0497e+000
1.8330e-001 2.9878e+000 2.0737e+000
2.9764e-001 2.7617e+000 2.1280e+000
4.8329e-001 2.3445e+000 2.2924e+000
7.8476e-001 1.4082e+000 2.8895e+000
1.2743e+000 3.7699e-001 3.9509e+000
2.0691e+000 2.4222e-010 4.4813e+000
3.3598e+000 6.0414e-012 4.4813e+000
5.4556e+000 4.3404e-010 4.4813e+000
8.8587e+000 1.8987e-010 4.4813e+000
1.4384e+001 1.0509e-011 4.4813e+000
2.3357e+001 3.5492e-012 4.4813e+000
3.7927e+001 5.2746e-010 4.4813e+000
6.1585e+001 1.8693e-012 4.4813e+000
1.0000e+002 1.4417e-010 4.4813e+000

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s