Entropy maximization
randn('state', 0);
rand('state', 0);
n = 20;
m = 10;
p = 5;
tmp = rand(n,1);
A = randn(m,n);
b = A*tmp;
F = randn(p,n);
g = F*tmp + rand(p,1);
cvx_begin
variable x(n)
maximize sum(entr(x))
A*x == b
F*x <= g
cvx_end
display('The optimal solution is:' );
disp(x);
Successive approximation method to be employed.
SDPT3 will be called several times to refine the solution.
Original size: 65 variables, 35 equality constraints
Approximation size: 226 variables, 135 equality constraints
-----------------------------------------------------------------
Target Conic Solver
Precision Error Status
---------------------------
1.221e-04 1.964e-01 Solved
1.221e-04 4.710e-04 Solved
1.221e-04 0.000e+00 Solved
1.490e-08 5.361e-08 Solved
1.490e-08 0.000e+00 Solved
-----------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +5.70334
The optimal solution is:
0.3445
0.3181
0.7539
0.8020
0.6418
0.3517
0.1981
0.2578
0.6373
0.3357
0.7109
0.8998
0.6085
0.6444
0.3061
0.4522
0.8886
0.7801
0.3106
0.6131