rs = randn( 'state' );
randn( 'state', 0 );
n = 4;
M = randn(n,n);
cvx_begin gp
variable d(n)
minimize( sqrt( sum( sum( diag(d.^2)*(M.^2)*diag(d.^-2) ) ) ) )
cvx_end
D = diag(d);
disp('The matrix D that minimizes ||DMD^{-1}||_F is: ');
disp(D);
disp('The minimium Frobenius norm achieved is: ');
disp(norm(D*M*inv(D),'fro'));
disp('while the Frobunius norm of the original matrix M is: ');
disp(norm(M,'fro'));
Successive approximation method to be employed.
SDPT3 will be called several times to refine the solution.
Original size: 55 variables, 34 equality constraints
16 exponentials add 128 variables, 80 equality constraints
-----------------------------------------------------------------
Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------+---------------------------------+---------
16/ 16 | 8.000e+00 1.276e+01 0.000e+00 | Solved
16/ 16 | 1.590e+00 1.546e-01 0.000e+00 | Solved
15/ 15 | 7.950e-02 4.017e-04 0.000e+00 | Solved
0/ 3 | 1.053e-03 6.705e-09 0.000e+00 | Solved
-----------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +3.25231
The matrix D that minimizes ||DMD^{-1}||_F is:
1.0864 0 0 0
0 0.9120 0 0
0 0 0.9735 0
0 0 0 1.6263
The minimium Frobenius norm achieved is:
3.2523
while the Frobunius norm of the original matrix M is:
3.6126